#!/usr/bin/python
from Tkinter import *
import ttk
import time
import threading
import RPi.GPIO as GPIO
import tkMessageBox
import Tkinter
import tkFileDialog
import os
import tkMessageBox

GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)

GPIO.setup(4,GPIO.OUT)
GPIO.setup(17,GPIO.OUT)
GPIO.setup(18,GPIO.OUT)
GPIO.setup(27,GPIO.OUT)
GPIO.setup(22,GPIO.OUT)
GPIO.setup(23,GPIO.OUT)
GPIO.setup(25,GPIO.OUT)
GPIO.setup(5,GPIO.OUT)
GPIO.setup(6,GPIO.OUT)
GPIO.setup(12,GPIO.OUT)
GPIO.setup(13,GPIO.OUT)
GPIO.setup(16,GPIO.OUT)
GPIO.setup(20,GPIO.OUT)
GPIO.setup(19,GPIO.OUT)
GPIO.setup(26,GPIO.OUT)
GPIO.setup(21,GPIO.OUT)
GPIO.setup(24, GPIO.OUT)
GPIO.setup(10, GPIO.OUT)
GPIO.setup(9, GPIO.OUT)
GPIO.setup(11, GPIO.OUT)
#Note: Ensure the SPI interface is disabled as GPIO 9, 10 and 11 are being used.

bit_0=4
bit_1=17
bit_2=18
bit_3=27
bit_4=22
bit_5=23
bit_6=25
bit_7=5
bit_8=6
bit_9=12
bit_10=13
bit_11=16
bit_12=20
bit_13=19
bit_14=26
bit_15=21
trig=24

speed0=0.5
speed1=0.5
speed2=0.5
speed3=0.5
speed4=0.5
speed5=0.5
speed6=0.5
speed7=0.5
speed8=0.5
speed9=0.5
speed10=0.5
speed11=0.5
speed12=0.5
speed13=0.5
speed14=0.5
speed15=0.5
speed16=0.5
speed17=0.5
speed18=0.5
speed19=0.5
speed20=0.5
speed21=0.5
speed22=0.5
speed23=0.5
speed24=0.5
speed25=0.5
speed26=0.5
speed27=0.5
speed28=0.5
speed29=0.5
speed30=0.5
speed31=0.5
speed32=0.5
speed33=0.5
speed34=0.5
speed35=0.5
speed36=0.5
speed37=0.5
speed38=0.5
speed39=0.5
speed40=0.5
speed41=0.5
speed42=0.5
speed43=0.5
speed44=0.5
speed45=0.5
speed46=0.5
speed47=0.5
speed48=0.5
speed49=0.5
speed50=0.5
speed51=0.5
speed52=0.5
speed53=0.5
speed54=0.5
speed55=0.5
speed56=0.5
speed57=0.5
speed58=0.5
speed59=0.5
speed60=0.5
speed61=0.5
speed62=0.5
speed63=0.5
speed64=0.5
speed65=0.5
speed66=0.5
speed67=0.5
speed68=0.5
speed69=0.5
speed70=0.5
speed71=0.5
speed72=0.5
speed73=0.5
speed74=0.5
speed75=0.5
speed76=0.5
speed77=0.5
speed78=0.5
speed79=0.5
speed80=0.5
speed81=0.5
speed82=0.5
speed83=0.5
speed84=0.5
speed85=0.5
speed86=0.5
speed87=0.5
speed88=0.5
speed89=0.5
speed90=0.5
speed91=0.5
speed92=0.5
speed93=0.5
speed94=0.5
speed95=0.5
speed96=0.5
speed97=0.5
speed98=0.5
speed99=0.5

repeat=0.5
loop=1
counter = 1

haltno=0

chan_list = (bit_0,bit_1,bit_2,bit_3,bit_4,bit_5,bit_6,bit_7,bit_8,bit_9,bit_10,bit_11,bit_12,bit_13,bit_14,bit_15,trig)

def close_window():
    root.after(0, root.destroy)

def about():
    tkMessageBox.showinfo(message=" Raspberry Pi / Drum Trigger\n                  v1.02 \n\n   Author: walkerworks 2016\nsequencer@walkerworks.co.uk  ")

def help_0():
    top = Toplevel()
    top.title("Help")

    msg = Message(top, text='(a) Set up the drum sounds you want by setting the check boxes, if you do not want to use \
all 100 then select the Halt check box next to your last note. All check boxes can be changed while \
the sequencer is running. \n\n(b) Select the time duration between each beat, in 0.025 second increments, with the Slower/Faster buttons. \
To change the default delay between each repeat then set the time with the Longer/Shorter buttons in the Loop Control area, again in 0.025 second increments.\n\n(c) \
In the Loop Control area select the check box, Infinite Loop ON/OFF, if you want beats to play in a contineous loop or... \n\n(d) \
To select a preset number of loops select the check box, Loop ON/OFF, in the Loop Control area. Use the More/Less buttons to \
select the number of loops. If neither Loop check boxes are selected the sequence will play once.\n\n(e) \
Selecting the Tempo Tracking faster/slower buttons steps the Tempo times up or down from note 1 to the checked Halt/Repeat box. \n\n(f) \
Select the Start button to begin the sequence. The position of play is shown by the beat number being highlighted in blue. \n\n(g) \
Select the Stop button to stop the sequence. On restart the sequence will start from the beginning.\n\n(h) \
Select the Reset button to clear all the Note, Halt, Repeat check boxes, Loop Times and Trigger ready to create another sequence. \n\n(i) \
Select a Trigger check box to start the RPi Maplin 3800 Sequencer. \n\n(j) \
Select the Synth Start or Stop buttons to manually control the RPi Maplin 3800 Synthesiser sequencer. \n\n(k) \
To save a sequence go to the menu bar and select File/Save As, a dialog box will open for you to name your file. Click Save to store your file. \
The default file extension is .trg \n\n(l) \
To load a previously saved sequence go to the menu bar and select File/Open, a dialog box will open for you to select a .trg file. \
Once selected click Open and your sequence will be restored.')
    msg.pack()

    button = Button(top, text="Close", command=top.destroy)
    button.pack()


def init(root):
    root.title("RPi Drum Trigger")
    root.geometry('1370x680')
#    root.geometry('1115x680')


def f0():
    global speed0
    if speed0 <= 0.05:
        return
    speed0=speed0 - 0.025
    show_speed0.set(speed0)
    showspeed0.configure(text=show_speed0.get())

def f1():
    global speed1
    if speed1 <= 0.05:
        return
    speed1=speed1 - 0.025
    show_speed1.set(speed1)
    showspeed1.configure(text=show_speed1.get())

def f2():
    global speed2
    if speed2 <= 0.05:
        return
    speed2=speed2 - 0.025
    show_speed2.set(speed2)
    showspeed2.configure(text=show_speed2.get())

def f3():
    global speed3
    if speed3 <= 0.05:
        return
    speed3=speed3 - 0.025
    show_speed3.set(speed3)
    showspeed3.configure(text=show_speed3.get())

def f4():
    global speed4
    if speed4 <= 0.05:
        return
    speed4=speed4 - 0.025
    show_speed4.set(speed4)
    showspeed4.configure(text=show_speed4.get())

def f5():
    global speed5
    if speed5 <= 0.05:
        return
    speed5=speed5 - 0.025
    show_speed5.set(speed5)
    showspeed5.configure(text=show_speed5.get())

def f6():
    global speed6
    if speed6 <= 0.05:
        return
    speed6=speed6 - 0.025
    show_speed6.set(speed6)
    showspeed6.configure(text=show_speed6.get())

def f7():
    global speed7
    if speed7 <= 0.05:
        return
    speed7=speed7 - 0.025
    show_speed7.set(speed7)
    showspeed7.configure(text=show_speed7.get())

def f8():
    global speed8
    if speed8 <= 0.05:
        return
    speed8=speed8 - 0.025
    show_speed8.set(speed8)
    showspeed8.configure(text=show_speed8.get())

def f9():
    global speed9
    if speed9 <= 0.05:
        return
    speed9=speed9 - 0.025
    show_speed9.set(speed9)
    showspeed9.configure(text=show_speed9.get())

def f10():
    global speed10
    if speed10 <= 0.05:
        return
    speed10=speed10 - 0.025
    show_speed10.set(speed10)
    showspeed10.configure(text=show_speed10.get())

def f11():
    global speed11
    if speed11 <= 0.05:
        return
    speed11=speed11 - 0.025
    show_speed11.set(speed11)
    showspeed11.configure(text=show_speed11.get())

def f12():
    global speed12
    if speed12 <= 0.05:
        return
    speed12=speed12 - 0.025
    show_speed12.set(speed12)
    showspeed12.configure(text=show_speed12.get())

def f13():
    global speed13
    if speed13 <= 0.05:
        return
    speed13=speed13 - 0.025
    show_speed13.set(speed13)
    showspeed13.configure(text=show_speed13.get())

def f14():
    global speed14
    if speed14 <= 0.05:
        return
    speed14=speed14 - 0.025
    show_speed14.set(speed14)
    showspeed14.configure(text=show_speed14.get())

def f15():
    global speed15
    if speed15 <= 0.05:
        return
    speed15=speed15 - 0.025
    show_speed15.set(speed15)
    showspeed15.configure(text=show_speed15.get())

def f16():
    global speed16
    if speed16 <= 0.05:
        return
    speed16=speed16 - 0.025
    show_speed16.set(speed16)
    showspeed16.configure(text=show_speed16.get())

def f17():
    global speed17
    if speed17 <= 0.05:
        return
    speed17=speed17 - 0.025
    show_speed17.set(speed17)
    showspeed17.configure(text=show_speed17.get())

def f18():
    global speed18
    if speed18 <= 0.05:
        return
    speed18=speed18 - 0.025
    show_speed18.set(speed18)
    showspeed18.configure(text=show_speed18.get())

def f19():
    global speed19
    if speed19 <= 0.05:
        return
    speed19=speed19 - 0.025
    show_speed19.set(speed19)
    showspeed19.configure(text=show_speed19.get())

def f20():
    global speed20
    if speed20 <= 0.05:
        return
    speed20=speed20 - 0.025
    show_speed20.set(speed20)
    showspeed20.configure(text=show_speed20.get())

def f21():
    global speed21
    if speed21 <= 0.05:
        return
    speed21=speed21 - 0.025
    show_speed21.set(speed21)
    showspeed21.configure(text=show_speed21.get())

def f22():
    global speed22
    if speed22 <= 0.05:
        return
    speed22=speed22 - 0.025
    show_speed22.set(speed22)
    showspeed22.configure(text=show_speed22.get())

def f23():
    global speed23
    if speed23 <= 0.05:
        return
    speed23=speed23 - 0.025
    show_speed23.set(speed23)
    showspeed23.configure(text=show_speed23.get())

def f24():
    global speed24
    if speed24 <= 0.05:
        return
    speed24=speed24 - 0.025
    show_speed24.set(speed24)
    showspeed24.configure(text=show_speed24.get())

def f25():
    global speed25
    if speed25 <= 0.05:
        return
    speed25=speed25 - 0.025
    show_speed25.set(speed25)
    showspeed25.configure(text=show_speed25.get())

def f26():
    global speed26
    if speed26 <= 0.05:
        return
    speed26=speed26 - 0.025
    show_speed26.set(speed26)
    showspeed26.configure(text=show_speed26.get())

def f27():
    global speed27
    if speed27 <= 0.05:
        return
    speed27=speed27 - 0.025
    show_speed27.set(speed27)
    showspeed27.configure(text=show_speed27.get())

def f28():
    global speed28
    if speed28 <= 0.05:
        return
    speed28=speed28 - 0.025
    show_speed28.set(speed28)
    showspeed28.configure(text=show_speed28.get())

def f29():
    global speed29
    if speed29 <= 0.05:
        return
    speed29=speed29 - 0.025
    show_speed29.set(speed29)
    showspeed29.configure(text=show_speed29.get())

def f30():
    global speed30
    if speed30 <= 0.05:
        return
    speed30=speed30 - 0.025
    show_speed30.set(speed30)
    showspeed30.configure(text=show_speed30.get())

def f31():
    global speed31
    if speed31 <= 0.05:
        return
    speed31=speed31 - 0.025
    show_speed31.set(speed31)
    showspeed31.configure(text=show_speed31.get())

def f32():
    global speed32
    if speed32 <= 0.05:
        return
    speed32=speed32 - 0.025
    show_speed32.set(speed32)
    showspeed32.configure(text=show_speed32.get())

def f33():
    global speed33
    if speed33 <= 0.05:
        return
    speed33=speed33 - 0.025
    show_speed33.set(speed33)
    showspeed33.configure(text=show_speed33.get())

def f34():
    global speed34
    if speed34 <= 0.05:
        return
    speed34=speed34 - 0.025
    show_speed34.set(speed34)
    showspeed34.configure(text=show_speed34.get())

def f35():
    global speed35
    if speed35 <= 0.05:
        return
    speed35=speed35 - 0.025
    show_speed35.set(speed35)
    showspeed35.configure(text=show_speed35.get())

def f36():
    global speed36
    if speed36 <= 0.05:
        return
    speed36=speed36 - 0.025
    show_speed36.set(speed36)
    showspeed36.configure(text=show_speed36.get())

def f37():
    global speed37
    if speed37 <= 0.05:
        return
    speed37=speed37 - 0.025
    show_speed37.set(speed37)
    showspeed37.configure(text=show_speed37.get())

def f38():
    global speed38
    if speed38 <= 0.05:
        return
    speed38=speed38 - 0.025
    show_speed38.set(speed38)
    showspeed38.configure(text=show_speed38.get())

def f39():
    global speed39
    if speed39 <= 0.05:
        return
    speed39=speed39 - 0.025
    show_speed39.set(speed39)
    showspeed39.configure(text=show_speed39.get())

def f40():
    global speed40
    if speed40 <= 0.05:
        return
    speed40=speed40 - 0.025
    show_speed40.set(speed40)
    showspeed40.configure(text=show_speed40.get())

def f41():
    global speed41
    if speed41 <= 0.05:
        return
    speed41=speed41 - 0.025
    show_speed41.set(speed41)
    showspeed41.configure(text=show_speed41.get())

def f42():
    global speed42
    if speed42 <= 0.05:
        return
    speed42=speed42 - 0.025
    show_speed42.set(speed42)
    showspeed42.configure(text=show_speed42.get())

def f43():
    global speed43
    if speed43 <= 0.05:
        return
    speed43=speed43 - 0.025
    show_speed43.set(speed43)
    showspeed43.configure(text=show_speed43.get())

def f44():
    global speed44
    if speed44 <= 0.05:
        return
    speed44=speed44 - 0.025
    show_speed44.set(speed44)
    showspeed44.configure(text=show_speed44.get())

def f45():
    global speed45
    if speed45 <= 0.05:
        return
    speed45=speed45 - 0.025
    show_speed45.set(speed45)
    showspeed45.configure(text=show_speed45.get())

def f46():
    global speed46
    if speed46 <= 0.05:
        return
    speed46=speed46 - 0.025
    show_speed46.set(speed46)
    showspeed46.configure(text=show_speed46.get())

def f47():
    global speed47
    if speed47 <= 0.05:
        return
    speed47=speed47 - 0.025
    show_speed47.set(speed47)
    showspeed47.configure(text=show_speed47.get())

def f48():
    global speed48
    if speed48 <= 0.05:
        return
    speed48=speed48 - 0.025
    show_speed48.set(speed48)
    showspeed48.configure(text=show_speed48.get())

def f49():
    global speed49
    if speed49 <= 0.05:
        return
    speed49=speed49 - 0.025
    show_speed49.set(speed49)
    showspeed49.configure(text=show_speed49.get())

def f50():
    global speed50
    if speed50 <= 0.05:
        return
    speed50=speed50 - 0.025
    show_speed50.set(speed50)
    showspeed50.configure(text=show_speed50.get())

def f51():
    global speed51
    if speed51 <= 0.05:
        return
    speed51=speed51 - 0.025
    show_speed51.set(speed51)
    showspeed51.configure(text=show_speed51.get())

def f52():
    global speed52
    if speed52 <= 0.05:
        return
    speed52=speed52 - 0.025
    show_speed52.set(speed52)
    showspeed52.configure(text=show_speed52.get())

def f53():
    global speed53
    if speed53 <= 0.05:
        return
    speed53=speed53 - 0.025
    show_speed53.set(speed53)
    showspeed53.configure(text=show_speed53.get())

def f54():
    global speed54
    if speed54 <= 0.05:
        return
    speed54=speed54 - 0.025
    show_speed54.set(speed54)
    showspeed54.configure(text=show_speed54.get())

def f55():
    global speed55
    if speed55 <= 0.05:
        return
    speed55=speed55 - 0.025
    show_speed55.set(speed55)
    showspeed55.configure(text=show_speed55.get())

def f56():
    global speed56
    if speed56 <= 0.05:
        return
    speed56=speed56 - 0.025
    show_speed56.set(speed56)
    showspeed56.configure(text=show_speed56.get())

def f57():
    global speed57
    if speed57 <= 0.05:
        return
    speed57=speed57 - 0.025
    show_speed57.set(speed57)
    showspeed57.configure(text=show_speed57.get())

def f58():
    global speed58
    if speed58 <= 0.05:
        return
    speed58=speed58 - 0.025
    show_speed58.set(speed58)
    showspeed58.configure(text=show_speed58.get())

def f59():
    global speed59
    if speed59 <= 0.05:
        return
    speed59=speed59 - 0.025
    show_speed59.set(speed59)
    showspeed59.configure(text=show_speed59.get())

def f60():
    global speed60
    if speed60 <= 0.05:
        return
    speed60=speed60 - 0.025
    show_speed60.set(speed60)
    showspeed60.configure(text=show_speed60.get())

def f61():
    global speed61
    if speed61 <= 0.05:
        return
    speed61=speed61 - 0.025
    show_speed61.set(speed61)
    showspeed61.configure(text=show_speed61.get())

def f62():
    global speed62
    if speed62 <= 0.05:
        return
    speed62=speed62 - 0.025
    show_speed62.set(speed62)
    showspeed62.configure(text=show_speed62.get())

def f63():
    global speed63
    if speed63 <= 0.05:
        return
    speed63=speed63 - 0.025
    show_speed63.set(speed63)
    showspeed63.configure(text=show_speed63.get())

def f64():
    global speed64
    if speed64 <= 0.05:
        return
    speed64=speed64 - 0.025
    show_speed64.set(speed64)
    showspeed64.configure(text=show_speed64.get())

def f65():
    global speed65
    if speed65 <= 0.05:
        return
    speed65=speed65 - 0.025
    show_speed65.set(speed65)
    showspeed65.configure(text=show_speed65.get())

def f66():
    global speed66
    if speed66 <= 0.05:
        return
    speed66=speed66 - 0.025
    show_speed66.set(speed66)
    showspeed66.configure(text=show_speed66.get())

def f67():
    global speed67
    if speed67 <= 0.05:
        return
    speed67=speed67 - 0.025
    show_speed67.set(speed67)
    showspeed67.configure(text=show_speed67.get())

def f68():
    global speed68
    if speed68 <= 0.05:
        return
    speed68=speed68 - 0.025
    show_speed68.set(speed68)
    showspeed68.configure(text=show_speed68.get())

def f69():
    global speed69
    if speed69 <= 0.05:
        return
    speed69=speed69 - 0.025
    show_speed69.set(speed69)
    showspeed69.configure(text=show_speed69.get())

def f70():
    global speed70
    if speed70 <= 0.05:
        return
    speed70=speed70 - 0.025
    show_speed70.set(speed70)
    showspeed70.configure(text=show_speed70.get())

def f71():
    global speed71
    if speed71 <= 0.05:
        return
    speed71=speed71 - 0.025
    show_speed71.set(speed71)
    showspeed71.configure(text=show_speed71.get())

def f72():
    global speed72
    if speed72 <= 0.05:
        return
    speed72=speed72 - 0.025
    show_speed72.set(speed72)
    showspeed72.configure(text=show_speed72.get())

def f73():
    global speed73
    if speed73 <= 0.05:
        return
    speed73=speed73 - 0.025
    show_speed73.set(speed73)
    showspeed73.configure(text=show_speed73.get())

def f74():
    global speed74
    if speed74 <= 0.05:
        return
    speed74=speed74 - 0.025
    show_speed74.set(speed74)
    showspeed74.configure(text=show_speed74.get())

def f75():
    global speed75
    if speed75 <= 0.05:
        return
    speed75=speed75 - 0.025
    show_speed75.set(speed75)
    showspeed75.configure(text=show_speed75.get())

def f76():
    global speed76
    if speed76 <= 0.05:
        return
    speed76=speed76 - 0.025
    show_speed76.set(speed76)
    showspeed76.configure(text=show_speed76.get())

def f77():
    global speed77
    if speed77 <= 0.05:
        return
    speed77=speed77 - 0.025
    show_speed77.set(speed77)
    showspeed77.configure(text=show_speed77.get())

def f78():
    global speed78
    if speed78 <= 0.05:
        return
    speed78=speed78 - 0.025
    show_speed78.set(speed78)
    showspeed78.configure(text=show_speed78.get())

def f79():
    global speed79
    if speed79 <= 0.05:
        return
    speed79=speed79 - 0.025
    show_speed79.set(speed79)
    showspeed79.configure(text=show_speed79.get())

def f80():
    global speed80
    if speed80 <= 0.05:
        return
    speed80=speed80 - 0.025
    show_speed80.set(speed80)
    showspeed80.configure(text=show_speed80.get())

def f81():
    global speed81
    if speed81 <= 0.05:
        return
    speed81=speed81 - 0.025
    show_speed81.set(speed81)
    showspeed81.configure(text=show_speed81.get())

def f82():
    global speed82
    if speed82 <= 0.05:
        return
    speed82=speed82 - 0.025
    show_speed82.set(speed82)
    showspeed82.configure(text=show_speed82.get())

def f83():
    global speed83
    if speed83 <= 0.05:
        return
    speed83=speed83 - 0.025
    show_speed83.set(speed83)
    showspeed83.configure(text=show_speed83.get())

def f84():
    global speed84
    if speed84 <= 0.05:
        return
    speed84=speed84 - 0.025
    show_speed84.set(speed84)
    showspeed84.configure(text=show_speed84.get())

def f85():
    global speed85
    if speed85 <= 0.05:
        return
    speed85=speed85 - 0.025
    show_speed85.set(speed85)
    showspeed85.configure(text=show_speed85.get())

def f86():
    global speed86
    if speed86 <= 0.05:
        return
    speed86=speed86 - 0.025
    show_speed86.set(speed86)
    showspeed86.configure(text=show_speed86.get())

def f87():
    global speed87
    if speed87 <= 0.05:
        return
    speed87=speed87 - 0.025
    show_speed87.set(speed87)
    showspeed87.configure(text=show_speed87.get())

def f88():
    global speed88
    if speed88 <= 0.05:
        return
    speed88=speed88 - 0.025
    show_speed88.set(speed88)
    showspeed88.configure(text=show_speed88.get())

def f89():
    global speed89
    if speed89 <= 0.05:
        return
    speed89=speed89 - 0.025
    show_speed89.set(speed89)
    showspeed89.configure(text=show_speed89.get())

def f90():
    global speed90
    if speed90 <= 0.05:
        return
    speed90=speed90 - 0.025
    show_speed90.set(speed90)
    showspeed90.configure(text=show_speed90.get())

def f91():
    global speed91
    if speed91 <= 0.05:
        return
    speed91=speed91 - 0.025
    show_speed91.set(speed91)
    showspeed91.configure(text=show_speed91.get())

def f92():
    global speed92
    if speed92 <= 0.05:
        return
    speed92=speed92 - 0.025
    show_speed92.set(speed92)
    showspeed92.configure(text=show_speed92.get())

def f93():
    global speed93
    if speed93 <= 0.05:
        return
    speed93=speed93 - 0.025
    show_speed93.set(speed93)
    showspeed93.configure(text=show_speed93.get())

def f94():
    global speed94
    if speed94 <= 0.05:
        return
    speed94=speed94 - 0.025
    show_speed94.set(speed94)
    showspeed94.configure(text=show_speed94.get())

def f95():
    global speed95
    if speed95 <= 0.05:
        return
    speed95=speed95 - 0.025
    show_speed95.set(speed95)
    showspeed95.configure(text=show_speed95.get())

def f96():
    global speed96
    if speed96 <= 0.05:
        return
    speed96=speed96 - 0.025
    show_speed96.set(speed96)
    showspeed96.configure(text=show_speed96.get())

def f97():
    global speed97
    if speed97 <= 0.05:
        return
    speed97=speed97 - 0.025
    show_speed97.set(speed97)
    showspeed97.configure(text=show_speed97.get())

def f98():
    global speed98
    if speed98 <= 0.05:
        return
    speed98=speed98 - 0.025
    show_speed98.set(speed98)
    showspeed98.configure(text=show_speed98.get())

def f99():
    global speed99
    if speed99 <= 0.05:
        return
    speed99=speed99 - 0.025
    show_speed99.set(speed99)
    showspeed99.configure(text=show_speed99.get())

def s0():
    global speed0
    speed0 = speed0 + 0.025
    show_speed0.set(speed0)
    showspeed0.configure(text=show_speed0.get())

def s1():
    global speed1
    speed1 = speed1 + 0.025
    show_speed1.set(speed1)
    showspeed1.configure(text=show_speed1.get())

def s2():
    global speed2
    speed2 = speed2 + 0.025
    show_speed2.set(speed2)
    showspeed2.configure(text=show_speed2.get())

def s3():
    global speed3
    speed3 = speed3 + 0.025
    show_speed3.set(speed3)
    showspeed3.configure(text=show_speed3.get())

def s4():
    global speed4
    speed4 = speed4 + 0.025
    show_speed4.set(speed4)
    showspeed4.configure(text=show_speed4.get())

def s5():
    global speed5
    speed5 = speed5 + 0.025
    show_speed5.set(speed5)
    showspeed5.configure(text=show_speed5.get())

def s6():
    global speed6
    speed6 = speed6 + 0.025
    show_speed6.set(speed6)
    showspeed6.configure(text=show_speed6.get())

def s7():
    global speed7
    speed7 = speed7 + 0.025
    show_speed7.set(speed7)
    showspeed7.configure(text=show_speed7.get())

def s8():
    global speed8
    speed8 = speed8 + 0.025
    show_speed8.set(speed8)
    showspeed8.configure(text=show_speed8.get())

def s9():
    global speed9
    speed9 = speed9 + 0.025
    show_speed9.set(speed9)
    showspeed9.configure(text=show_speed9.get())

def s10():
    global speed10
    speed10 = speed10 + 0.025
    show_speed10.set(speed10)
    showspeed10.configure(text=show_speed10.get())

def s11():
    global speed11
    speed11 = speed11 + 0.025
    show_speed11.set(speed11)
    showspeed11.configure(text=show_speed11.get())

def s12():
    global speed12
    speed12 = speed12 + 0.025
    show_speed12.set(speed12)
    showspeed12.configure(text=show_speed12.get())

def s13():
    global speed13
    speed13 = speed13 + 0.025
    show_speed13.set(speed13)
    showspeed13.configure(text=show_speed13.get())

def s14():
    global speed14
    speed14 = speed14 + 0.025
    show_speed14.set(speed14)
    showspeed14.configure(text=show_speed14.get())

def s15():
    global speed15
    speed15 = speed15 + 0.025
    show_speed15.set(speed15)
    showspeed15.configure(text=show_speed15.get())

def s16():
    global speed16
    speed16 = speed16 + 0.025
    show_speed16.set(speed16)
    showspeed16.configure(text=show_speed16.get())

def s17():
    global speed17
    speed17 = speed17 + 0.025
    show_speed17.set(speed17)
    showspeed17.configure(text=show_speed17.get())

def s18():
    global speed18
    speed18 = speed18 + 0.025
    show_speed18.set(speed18)
    showspeed18.configure(text=show_speed18.get())

def s19():
    global speed19
    speed19 = speed19 + 0.025
    show_speed19.set(speed19)
    showspeed19.configure(text=show_speed19.get())

def s20():
    global speed20
    speed20 = speed20 + 0.025
    show_speed20.set(speed20)
    showspeed20.configure(text=show_speed20.get())

def s21():
    global speed21
    speed21 = speed21 + 0.025
    show_speed21.set(speed21)
    showspeed21.configure(text=show_speed21.get())

def s22():
    global speed22
    speed22 = speed22 + 0.025
    show_speed22.set(speed22)
    showspeed22.configure(text=show_speed22.get())

def s23():
    global speed23
    speed23 = speed23 + 0.025
    show_speed23.set(speed23)
    showspeed23.configure(text=show_speed23.get())

def s24():
    global speed24
    speed24 = speed24 + 0.025
    show_speed24.set(speed24)
    showspeed24.configure(text=show_speed24.get())

def s25():
    global speed25
    speed25 = speed25 + 0.025
    show_speed25.set(speed25)
    showspeed25.configure(text=show_speed25.get())

def s26():
    global speed26
    speed26 = speed26 + 0.025
    show_speed26.set(speed26)
    showspeed26.configure(text=show_speed26.get())

def s27():
    global speed27
    speed27 = speed27 + 0.025
    show_speed27.set(speed27)
    showspeed27.configure(text=show_speed27.get())

def s28():
    global speed28
    speed28 = speed28 + 0.025
    show_speed28.set(speed28)
    showspeed28.configure(text=show_speed28.get())

def s29():
    global speed29
    speed29 = speed29 + 0.025
    show_speed29.set(speed29)
    showspeed29.configure(text=show_speed29.get())

def s30():
    global speed30
    speed30 = speed30 + 0.025
    show_speed30.set(speed30)
    showspeed30.configure(text=show_speed30.get())

def s31():
    global speed31
    speed31 = speed31 + 0.025
    show_speed31.set(speed31)
    showspeed31.configure(text=show_speed31.get())

def s32():
    global speed32
    speed32 = speed32 + 0.025
    show_speed32.set(speed32)
    showspeed32.configure(text=show_speed32.get())

def s33():
    global speed33
    speed33 = speed33 + 0.025
    show_speed33.set(speed33)
    showspeed33.configure(text=show_speed33.get())

def s34():
    global speed34
    speed34 = speed34 + 0.025
    show_speed34.set(speed34)
    showspeed34.configure(text=show_speed34.get())

def s35():
    global speed35
    speed35 = speed35 + 0.025
    show_speed35.set(speed35)
    showspeed35.configure(text=show_speed35.get())

def s36():
    global speed36
    speed36 = speed36 + 0.025
    show_speed36.set(speed36)
    showspeed36.configure(text=show_speed36.get())

def s37():
    global speed37
    speed37 = speed37 + 0.025
    show_speed37.set(speed37)
    showspeed37.configure(text=show_speed37.get())

def s38():
    global speed38
    speed38 = speed38 + 0.025
    show_speed38.set(speed38)
    showspeed38.configure(text=show_speed38.get())

def s39():
    global speed39
    speed39 = speed39 + 0.025
    show_speed39.set(speed39)
    showspeed39.configure(text=show_speed39.get())

def s40():
    global speed40
    speed40 = speed40 + 0.025
    show_speed40.set(speed40)
    showspeed40.configure(text=show_speed40.get())

def s41():
    global speed41
    speed41 = speed41 + 0.025
    show_speed41.set(speed41)
    showspeed41.configure(text=show_speed41.get())

def s42():
    global speed42
    speed42 = speed42 + 0.025
    show_speed42.set(speed42)
    showspeed42.configure(text=show_speed42.get())

def s43():
    global speed43
    speed43 = speed43 + 0.025
    show_speed43.set(speed43)
    showspeed43.configure(text=show_speed43.get())

def s44():
    global speed44
    speed44 = speed44 + 0.025
    show_speed44.set(speed44)
    showspeed44.configure(text=show_speed44.get())

def s45():
    global speed45
    speed45 = speed45 + 0.025
    show_speed45.set(speed45)
    showspeed45.configure(text=show_speed45.get())

def s46():
    global speed46
    speed46 = speed46 + 0.025
    show_speed46.set(speed46)
    showspeed46.configure(text=show_speed46.get())

def s47():
    global speed47
    speed47 = speed47 + 0.025
    show_speed47.set(speed47)
    showspeed47.configure(text=show_speed47.get())

def s48():
    global speed48
    speed48 = speed48 + 0.025
    show_speed48.set(speed48)
    showspeed48.configure(text=show_speed48.get())

def s49():
    global speed49
    speed49 = speed49 + 0.025
    show_speed49.set(speed49)
    showspeed49.configure(text=show_speed49.get())

def s50():
    global speed50
    speed50 = speed50 + 0.025
    show_speed50.set(speed50)
    showspeed50.configure(text=show_speed50.get())

def s51():
    global speed51
    speed51 = speed51 + 0.025
    show_speed51.set(speed51)
    showspeed51.configure(text=show_speed51.get())

def s52():
    global speed52
    speed52 = speed52 + 0.025
    show_speed52.set(speed52)
    showspeed52.configure(text=show_speed52.get())

def s53():
    global speed53
    speed53 = speed53 + 0.025
    show_speed53.set(speed53)
    showspeed53.configure(text=show_speed53.get())

def s54():
    global speed54
    speed54 = speed54 + 0.025
    show_speed54.set(speed54)
    showspeed54.configure(text=show_speed54.get())

def s55():
    global speed55
    speed55 = speed55 + 0.025
    show_speed55.set(speed55)
    showspeed55.configure(text=show_speed55.get())

def s56():
    global speed56
    speed56 = speed56 + 0.025
    show_speed56.set(speed56)
    showspeed56.configure(text=show_speed56.get())

def s57():
    global speed57
    speed57 = speed57 + 0.025
    show_speed57.set(speed57)
    showspeed57.configure(text=show_speed57.get())

def s58():
    global speed58
    speed58 = speed58 + 0.025
    show_speed58.set(speed58)
    showspeed58.configure(text=show_speed58.get())

def s59():
    global speed59
    speed59 = speed59 + 0.025
    show_speed59.set(speed59)
    showspeed59.configure(text=show_speed59.get())

def s60():
    global speed60
    speed60 = speed60 + 0.025
    show_speed60.set(speed60)
    showspeed60.configure(text=show_speed60.get())

def s61():
    global speed61
    speed61 = speed61 + 0.025
    show_speed61.set(speed61)
    showspeed61.configure(text=show_speed61.get())

def s62():
    global speed62
    speed62 = speed62 + 0.025
    show_speed62.set(speed62)
    showspeed62.configure(text=show_speed62.get())

def s63():
    global speed63
    speed63 = speed63 + 0.025
    show_speed63.set(speed63)
    showspeed63.configure(text=show_speed63.get())

def s64():
    global speed64
    speed64 = speed64 + 0.025
    show_speed64.set(speed64)
    showspeed64.configure(text=show_speed64.get())

def s65():
    global speed65
    speed65 = speed65 + 0.025
    show_speed65.set(speed65)
    showspeed65.configure(text=show_speed65.get())

def s66():
    global speed66
    speed66 = speed66 + 0.025
    show_speed66.set(speed66)
    showspeed66.configure(text=show_speed66.get())

def s67():
    global speed67
    speed67 = speed67 + 0.025
    show_speed67.set(speed67)
    showspeed67.configure(text=show_speed67.get())

def s68():
    global speed68
    speed68 = speed68 + 0.025
    show_speed68.set(speed68)
    showspeed68.configure(text=show_speed68.get())

def s69():
    global speed69
    speed69 = speed69 + 0.025
    show_speed69.set(speed69)
    showspeed69.configure(text=show_speed69.get())

def s70():
    global speed70
    speed70 = speed70 + 0.025
    show_speed70.set(speed70)
    showspeed70.configure(text=show_speed70.get())

def s71():
    global speed71
    speed71 = speed71 + 0.025
    show_speed71.set(speed71)
    showspeed71.configure(text=show_speed71.get())

def s72():
    global speed72
    speed72 = speed72 + 0.025
    show_speed72.set(speed72)
    showspeed72.configure(text=show_speed72.get())

def s73():
    global speed73
    speed73 = speed73 + 0.025
    show_speed73.set(speed73)
    showspeed73.configure(text=show_speed73.get())

def s74():
    global speed74
    speed74 = speed74 + 0.025
    show_speed74.set(speed74)
    showspeed74.configure(text=show_speed74.get())

def s75():
    global speed75
    speed75 = speed75 + 0.025
    show_speed75.set(speed75)
    showspeed75.configure(text=show_speed75.get())

def s76():
    global speed76
    speed76 = speed76 + 0.025
    show_speed76.set(speed76)
    showspeed76.configure(text=show_speed76.get())

def s77():
    global speed77
    speed77 = speed77 + 0.025
    show_speed77.set(speed77)
    showspeed77.configure(text=show_speed77.get())

def s78():
    global speed78
    speed78 = speed78 + 0.025
    show_speed78.set(speed78)
    showspeed78.configure(text=show_speed78.get())

def s79():
    global speed79
    speed79 = speed79 + 0.025
    show_speed79.set(speed79)
    showspeed79.configure(text=show_speed79.get())

def s80():
    global speed80
    speed80 = speed80 + 0.025
    show_speed80.set(speed80)
    showspeed80.configure(text=show_speed80.get())

def s81():
    global speed81
    speed81 = speed81 + 0.025
    show_speed81.set(speed81)
    showspeed81.configure(text=show_speed81.get())

def s82():
    global speed82
    speed82 = speed82 + 0.025
    show_speed82.set(speed82)
    showspeed82.configure(text=show_speed82.get())

def s83():
    global speed83
    speed83 = speed83 + 0.025
    show_speed83.set(speed83)
    showspeed83.configure(text=show_speed83.get())

def s84():
    global speed84
    speed84 = speed84 + 0.025
    show_speed84.set(speed84)
    showspeed84.configure(text=show_speed84.get())

def s85():
    global speed85
    speed85 = speed85 + 0.025
    show_speed85.set(speed85)
    showspeed85.configure(text=show_speed85.get())

def s86():
    global speed86
    speed86 = speed86 + 0.025
    show_speed86.set(speed86)
    showspeed86.configure(text=show_speed86.get())

def s87():
    global speed87
    speed87 = speed87 + 0.025
    show_speed87.set(speed87)
    showspeed87.configure(text=show_speed87.get())

def s88():
    global speed88
    speed88 = speed88 + 0.025
    show_speed88.set(speed88)
    showspeed88.configure(text=show_speed88.get())

def s89():
    global speed89
    speed89 = speed89 + 0.025
    show_speed89.set(speed89)
    showspeed89.configure(text=show_speed89.get())

def s90():
    global speed90
    speed90 = speed90 + 0.025
    show_speed90.set(speed90)
    showspeed90.configure(text=show_speed90.get())

def s91():
    global speed91
    speed91 = speed91 + 0.025
    show_speed91.set(speed91)
    showspeed91.configure(text=show_speed91.get())

def s92():
    global speed92
    speed92 = speed92 + 0.025
    show_speed92.set(speed92)
    showspeed92.configure(text=show_speed92.get())

def s93():
    global speed93
    speed93 = speed93 + 0.025
    show_speed93.set(speed93)
    showspeed93.configure(text=show_speed93.get())

def s94():
    global speed94
    speed94 = speed94 + 0.025
    show_speed94.set(speed94)
    showspeed94.configure(text=show_speed94.get())

def s95():
    global speed95
    speed95 = speed95 + 0.025
    show_speed95.set(speed95)
    showspeed95.configure(text=show_speed95.get())

def s96():
    global speed96
    speed96 = speed96 + 0.025
    show_speed96.set(speed96)
    showspeed96.configure(text=show_speed96.get())

def s97():
    global speed97
    speed97 = speed97 + 0.025
    show_speed97.set(speed97)
    showspeed97.configure(text=show_speed97.get())

def s98():
    global speed98
    speed98 = speed98 + 0.025
    show_speed98.set(speed98)
    showspeed98.configure(text=show_speed98.get())

def s99():
    global speed99
    speed99 = speed99 + 0.025
    show_speed99.set(speed99)
    showspeed99.configure(text=show_speed99.get())

def repeatup():
    global repeat
    if repeat <= 0.05:
        return
    repeat=repeat - 0.025
    show_repeat.set(repeat)
    showrepeat.configure(text=show_repeat.get())

def repeatdn():
    global repeat
    repeat = repeat + 0.025
    show_repeat.set(repeat)
    showrepeat.configure(text=show_repeat.get())

def loopup():
    global loop, counter
    loop=loop + 1
    show_loop.set(loop)
    showloop.configure(text=show_loop.get())
    counter=loop

def loopdn():
    global loop, counter
    if loop <= 1:
        return
    loop = loop - 1
    show_loop.set(loop)
    showloop.configure(text=show_loop.get())
    counter=loop


def play():

#Beat 1
    c1.set("cyan")
    nameb0_0.configure(background=c1.get())
    GPIO.output(chan_list, (b0_0var.get(),b0_1var.get(),b0_2var.get(),b0_3var.get(),b0_4var.get(),b0_5var.get(),b0_6var.get(),b0_7var.get(), \
                            b0_8var.get(),b0_9var.get(),b0_10var.get(),b0_11var.get(),b0_12var.get(),b0_13var.get(),b0_14var.get(),b0_15var.get(),trig_1var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed0)                
    c1.set("gray84")
    nameb0_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b0_17var.get() == 1:
        return

#Beat 2
    c1.set("cyan")
    nameb1_0.configure(background=c1.get())
    GPIO.output(chan_list, (b1_0var.get(),b1_1var.get(),b1_2var.get(),b1_3var.get(),b1_4var.get(),b1_5var.get(),b1_6var.get(),b1_7var.get(), \
                            b1_8var.get(),b1_9var.get(),b1_10var.get(),b1_11var.get(),b1_12var.get(),b1_13var.get(),b1_14var.get(),b1_15var.get(),trig_2var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed1)
    c1.set("gray84")
    nameb1_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b1_17var.get() == 1:
        return

#Beat 3
    c1.set("cyan")
    nameb2_0.configure(background=c1.get())
    GPIO.output(chan_list, (b2_0var.get(),b2_1var.get(),b2_2var.get(),b2_3var.get(),b2_4var.get(),b2_5var.get(),b2_6var.get(),b2_7var.get(), \
                            b2_8var.get(),b2_9var.get(),b2_10var.get(),b2_11var.get(),b2_12var.get(),b2_13var.get(),b2_14var.get(),b2_15var.get(),trig_3var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed2)
    c1.set("gray84")
    nameb2_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b2_17var.get() == 1:
        return

#Beat 4
    c1.set("cyan")
    nameb3_0.configure(background=c1.get())
    GPIO.output(chan_list, (b3_0var.get(),b3_1var.get(),b3_2var.get(),b3_3var.get(),b3_4var.get(),b3_5var.get(),b3_6var.get(),b3_7var.get(), \
                            b3_8var.get(),b3_9var.get(),b3_10var.get(),b3_11var.get(),b3_12var.get(),b3_13var.get(),b3_14var.get(),b3_15var.get(),trig_4var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed3)
    c1.set("gray84")
    nameb3_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b3_17var.get() == 1:
        return

#Beat 5
    c1.set("cyan")
    nameb4_0.configure(background=c1.get())
    GPIO.output(chan_list, (b4_0var.get(),b4_1var.get(),b4_2var.get(),b4_3var.get(),b4_4var.get(),b4_5var.get(),b4_6var.get(),b4_7var.get(), \
                            b4_8var.get(),b4_9var.get(),b4_10var.get(),b4_11var.get(),b4_12var.get(),b4_13var.get(),b4_14var.get(),b4_15var.get(),trig_5var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed4)
    c1.set("gray84")
    nameb4_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b4_17var.get() == 1:
        return

#Beat 6
    c1.set("cyan")
    nameb5_0.configure(background=c1.get())
    GPIO.output(chan_list, (b5_0var.get(),b5_1var.get(),b5_2var.get(),b5_3var.get(),b5_4var.get(),b5_5var.get(), b5_6var.get(),b5_7var.get(), \
                            b5_8var.get(),b5_9var.get(),b5_10var.get(),b5_11var.get(),b5_12var.get(),b5_13var.get(),b5_14var.get(),b5_15var.get(),trig_6var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed5)
    c1.set("gray84")
    nameb5_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b5_17var.get() == 1:
        return

#Beat 7
    c1.set("cyan")
    nameb6_0.configure(background=c1.get())
    GPIO.output(chan_list, (b6_0var.get(),b6_1var.get(),b6_2var.get(),b6_3var.get(),b6_4var.get(),b6_5var.get(),b6_6var.get(),b6_7var.get(), \
                            b6_8var.get(),b6_9var.get(),b6_10var.get(),b6_11var.get(),b6_12var.get(),b6_13var.get(),b6_14var.get(),b6_15var.get(),trig_7var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed6)
    c1.set("gray84")
    nameb6_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b6_17var.get() == 1:
        return

#Beat 8
    c1.set("cyan")
    nameb7_0.configure(background=c1.get())
    GPIO.output(chan_list, (b7_0var.get(),b7_1var.get(),b7_2var.get(),b7_3var.get(),b7_4var.get(),b7_5var.get(),b7_6var.get(),b7_7var.get(), \
                            b7_8var.get(),b7_9var.get(),b7_10var.get(),b7_11var.get(),b7_12var.get(),b7_13var.get(),b7_14var.get(),b7_15var.get(),trig_8var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed7)
    c1.set("gray84")
    nameb7_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b7_17var.get() == 1:
        return

#Beat 9
    c1.set("cyan")
    nameb8_0.configure(background=c1.get())
    GPIO.output(chan_list, (b8_0var.get(),b8_1var.get(),b8_2var.get(),b8_3var.get(),b8_4var.get(),b8_5var.get(),b8_6var.get(),b6_7var.get(), \
                            b8_8var.get(),b8_9var.get(),b8_10var.get(),b8_11var.get(),b8_12var.get(),b8_13var.get(),b8_14var.get(),b8_15var.get(),trig_9var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed8)
    c1.set("gray84")
    nameb8_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b8_17var.get() == 1:
        return

#Beat 10
    c1.set("cyan")
    nameb9_0.configure(background=c1.get())
    GPIO.output(chan_list, (b9_0var.get(),b9_1var.get(),b9_2var.get(),b9_3var.get(),b9_4var.get(),b9_5var.get(),b9_6var.get(),b9_7var.get(), \
                            b9_8var.get(),b9_9var.get(),b9_10var.get(),b9_11var.get(),b9_12var.get(),b9_13var.get(),b9_14var.get(),b9_15var.get(),trig_10var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed9)
    c1.set("gray84")
    nameb9_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b9_17var.get() == 1:
        return

#Beat 11
    c1.set("cyan")
    nameb10_0.configure(background=c1.get())
    GPIO.output(chan_list, (b10_0var.get(),b10_1var.get(),b10_2var.get(),b10_3var.get(),b10_4var.get(),b10_5var.get(),b10_6var.get(),b10_7var.get(), \
                            b10_8var.get(),b10_9var.get(),b10_10var.get(),b10_11var.get(),b10_12var.get(),b10_13var.get(),b10_14var.get(),b10_15var.get(),trig_11var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed10)
    c1.set("gray84")
    nameb10_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b10_17var.get() == 1:
        return

#Beat 12
    c1.set("cyan")
    nameb11_0.configure(background=c1.get())
    GPIO.output(chan_list, (b11_0var.get(),b11_1var.get(),b11_2var.get(),b11_3var.get(),b11_4var.get(),b11_5var.get(),b11_6var.get(),b11_7var.get(), \
                            b11_8var.get(),b11_9var.get(),b11_10var.get(),b11_11var.get(),b11_12var.get(),b11_13var.get(),b11_14var.get(),b11_15var.get(),trig_12var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed11)
    c1.set("gray84")
    nameb11_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b11_17var.get() == 1:
        return

#Beat 13
    c1.set("cyan")
    nameb12_0.configure(background=c1.get())
    GPIO.output(chan_list, (b12_0var.get(),b12_1var.get(),b12_2var.get(),b12_3var.get(),b12_4var.get(),b12_5var.get(),b12_6var.get(),b12_7var.get(), \
                            b12_8var.get(),b12_9var.get(),b12_10var.get(),b12_11var.get(),b12_12var.get(),b12_13var.get(),b12_14var.get(),b12_15var.get(),trig_13var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed12)
    c1.set("gray84")
    nameb12_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b12_17var.get() == 1:
        return

#Beat 14
    c1.set("cyan")
    nameb13_0.configure(background=c1.get())
    GPIO.output(chan_list, (b13_0var.get(),b13_1var.get(),b13_2var.get(),b13_3var.get(),b13_4var.get(),b13_5var.get(),b13_6var.get(),b13_7var.get(), \
                            b13_8var.get(),b13_9var.get(),b13_10var.get(),b13_11var.get(),b13_12var.get(),b13_13var.get(),b13_14var.get(),b13_15var.get(),trig_14var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed13)
    c1.set("gray84")
    nameb13_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b13_17var.get() == 1:
        return

#Beat 15
    c1.set("cyan")
    nameb14_0.configure(background=c1.get())
    GPIO.output(chan_list, (b14_0var.get(),b14_1var.get(),b14_2var.get(),b14_3var.get(),b14_4var.get(),b14_5var.get(),b14_6var.get(),b14_7var.get(), \
                            b14_8var.get(),b14_9var.get(),b14_10var.get(),b14_11var.get(),b14_12var.get(),b14_13var.get(),b14_14var.get(),b14_15var.get(),trig_15var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed14)
    c1.set("gray84")
    nameb14_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b14_17var.get() == 1:
        return

#Beat 16
    c1.set("cyan")
    nameb15_0.configure(background=c1.get())
    GPIO.output(chan_list, (b15_0var.get(),b15_1var.get(),b15_2var.get(),b15_3var.get(),b15_4var.get(),b15_5var.get(),b15_6var.get(),b15_7var.get(), \
                            b15_8var.get(),b15_9var.get(),b15_10var.get(),b15_11var.get(),b15_12var.get(),b15_13var.get(),b15_14var.get(),b15_15var.get(),trig_16var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed15)
    c1.set("gray84")
    nameb15_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b15_17var.get() == 1:
        return

#Beat 17
    c1.set("cyan")
    nameb16_0.configure(background=c1.get())
    GPIO.output(chan_list, (b16_0var.get(),b16_1var.get(),b16_2var.get(),b16_3var.get(),b16_4var.get(),b16_5var.get(),b16_6var.get(),b16_7var.get(), \
                            b16_8var.get(),b16_9var.get(),b16_10var.get(),b16_11var.get(),b16_12var.get(),b16_13var.get(),b16_14var.get(),b16_15var.get(),trig_17var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed16)
    c1.set("gray84")
    nameb16_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b16_17var.get() == 1:
        return

#Beat 18
    c1.set("cyan")
    nameb17_0.configure(background=c1.get())
    GPIO.output(chan_list, (b17_0var.get(),b17_1var.get(),b17_2var.get(),b17_3var.get(),b17_4var.get(),b17_5var.get(),b17_6var.get(),b17_7var.get(), \
                            b17_8var.get(),b17_9var.get(),b17_10var.get(),b17_11var.get(),b17_12var.get(),b17_13var.get(),b17_14var.get(),b17_15var.get(),trig_18var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed17)
    c1.set("gray84")
    nameb17_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b17_17var.get() == 1:
        return

#Beat 19
    c1.set("cyan")
    nameb18_0.configure(background=c1.get())
    GPIO.output(chan_list, (b18_0var.get(),b18_1var.get(),b18_2var.get(),b18_3var.get(),b18_4var.get(),b18_5var.get(),b18_6var.get(),b18_7var.get(), \
                            b18_8var.get(),b18_9var.get(),b18_10var.get(),b18_11var.get(),b18_12var.get(),b18_13var.get(),b18_14var.get(),b18_15var.get(),trig_19var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed18)
    c1.set("gray84")
    nameb18_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b18_17var.get() == 1:
        return

#Beat 20
    c1.set("cyan")
    nameb19_0.configure(background=c1.get())
    GPIO.output(chan_list, (b19_0var.get(),b19_1var.get(),b19_2var.get(),b19_3var.get(),b19_4var.get(),b19_5var.get(),b19_6var.get(),b19_7var.get(), \
                            b19_8var.get(),b19_9var.get(),b19_10var.get(),b19_11var.get(),b19_12var.get(),b19_13var.get(),b19_14var.get(),b19_15var.get(),trig_20var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed19)
    c1.set("gray84")
    nameb19_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b19_17var.get() == 1:
        return

#Beat 21
    c1.set("cyan")
    nameb20_0.configure(background=c1.get())
    GPIO.output(chan_list, (b20_0var.get(),b20_1var.get(),b20_2var.get(),b20_3var.get(),b20_4var.get(),b20_5var.get(),b20_6var.get(),b20_7var.get(), \
                            b20_8var.get(),b20_9var.get(),b20_10var.get(),b20_11var.get(),b20_12var.get(),b20_13var.get(),b20_14var.get(),b20_15var.get(),trig_21var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed20)
    c1.set("gray84")
    nameb20_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b20_17var.get() == 1:
        return

#Beat 22
    c1.set("cyan")
    nameb21_0.configure(background=c1.get())
    GPIO.output(chan_list, (b21_0var.get(),b21_1var.get(),b21_2var.get(),b21_3var.get(),b21_4var.get(),b21_5var.get(),b21_6var.get(),b21_7var.get(), \
                            b20_8var.get(),b20_9var.get(),b20_10var.get(),b20_11var.get(),b20_12var.get(),b20_13var.get(),b20_14var.get(),b20_15var.get(),trig_22var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed21)
    c1.set("gray84")
    nameb21_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b21_17var.get() == 1:
        return

#Beat 23
    c1.set("cyan")
    nameb22_0.configure(background=c1.get())
    GPIO.output(chan_list, (b22_0var.get(),b22_1var.get(),b22_2var.get(),b22_3var.get(),b22_4var.get(),b22_5var.get(),b22_6var.get(),b22_7var.get(), \
                            b22_8var.get(),b22_9var.get(),b22_10var.get(),b22_11var.get(),b22_12var.get(),b22_13var.get(),b22_14var.get(),b22_15var.get(),trig_23var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed22)
    c1.set("gray84")
    nameb22_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b22_17var.get() == 1:
        return

#Beat 24
    c1.set("cyan")
    nameb23_0.configure(background=c1.get())
    GPIO.output(chan_list, (b23_0var.get(),b23_1var.get(),b23_2var.get(),b23_3var.get(),b23_4var.get(),b23_5var.get(),b23_6var.get(), b23_7var.get(), \
                            b23_8var.get(),b23_9var.get(),b23_10var.get(),b23_11var.get(),b23_12var.get(),b23_13var.get(),b23_14var.get(),b23_15var.get(),trig_24var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed23)
    c1.set("gray84")
    nameb23_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b23_17var.get() == 1:
        return


#Beat 25
    c1.set("cyan")
    nameb24_0.configure(background=c1.get())
    GPIO.output(chan_list, (b24_0var.get(),b24_1var.get(),b24_2var.get(),b24_3var.get(),b24_4var.get(),b24_5var.get(),b24_6var.get(),b24_7var.get(), \
                            b24_8var.get(),b24_9var.get(),b24_10var.get(),b24_11var.get(),b24_12var.get(),b24_13var.get(),b24_14var.get(),b24_15var.get(),trig_25var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed24)
    c1.set("gray84")
    nameb24_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b24_17var.get() == 1:
        return

#Beat 26
    c1.set("cyan")
    nameb25_0.configure(background=c1.get())
    GPIO.output(chan_list, (b25_0var.get(),b25_1var.get(),b25_2var.get(),b25_3var.get(),b25_4var.get(),b25_5var.get(),b25_6var.get(),b25_7var.get(), \
                            b25_8var.get(),b25_9var.get(),b25_10var.get(),b25_11var.get(),b25_12var.get(),b25_13var.get(),b25_14var.get(),b25_15var.get(),trig_26var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed25)
    c1.set("gray84")
    nameb25_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b25_17var.get() == 1:
        return

#Beat 27
    c1.set("cyan")
    nameb26_0.configure(background=c1.get())
    GPIO.output(chan_list, (b26_0var.get(),b26_1var.get(),b26_2var.get(),b26_3var.get(),b26_4var.get(),b26_5var.get(),b26_6var.get(),b26_7var.get(), \
                            b26_8var.get(),b26_9var.get(),b26_10var.get(),b26_11var.get(),b26_12var.get(),b26_13var.get(),b26_14var.get(),b26_15var.get(),trig_27var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed26)
    c1.set("gray84")
    nameb26_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b26_17var.get() == 1:
        return

#Beat 28
    c1.set("cyan")
    nameb27_0.configure(background=c1.get())
    GPIO.output(chan_list, (b27_0var.get(),b27_1var.get(),b27_2var.get(),b27_3var.get(),b27_4var.get(),b27_5var.get(),b27_6var.get(),b27_7var.get(), \
                            b27_8var.get(),b27_9var.get(),b27_10var.get(),b27_11var.get(),b27_12var.get(),b27_13var.get(),b27_14var.get(),b27_15var.get(),trig_28var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed27)
    c1.set("gray84")
    nameb27_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b27_17var.get() == 1:
        return

#Beat 29
    c1.set("cyan")
    nameb28_0.configure(background=c1.get())
    GPIO.output(chan_list, (b28_0var.get(),b28_1var.get(),b28_2var.get(),b28_3var.get(),b28_4var.get(),b28_5var.get(),b28_6var.get(),b28_7var.get(), \
                            b28_8var.get(),b28_9var.get(),b28_10var.get(),b28_11var.get(),b28_12var.get(),b28_13var.get(),b28_14var.get(),b28_15var.get(),trig_29var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed28)
    c1.set("gray84")
    nameb28_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b28_17var.get() == 1:
        return

#Beat 30
    c1.set("cyan")
    nameb29_0.configure(background=c1.get())
    GPIO.output(chan_list, (b29_0var.get(),b29_1var.get(),b29_2var.get(),b29_3var.get(),b29_4var.get(),b29_5var.get(),b29_6var.get(),b29_7var.get(), \
                            b29_8var.get(),b29_9var.get(),b29_10var.get(),b29_11var.get(),b29_12var.get(),b29_13var.get(),b29_14var.get(),b29_15var.get(),trig_30var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed29)
    c1.set("gray84")
    nameb29_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b29_17var.get() == 1:
        return

#Beat 31
    c1.set("cyan")
    nameb30_0.configure(background=c1.get())
    GPIO.output(chan_list, (b30_0var.get(),b30_1var.get(),b30_2var.get(),b30_3var.get(),b30_4var.get(),b30_5var.get(),b30_6var.get(),b30_7var.get(), \
                            b30_8var.get(),b30_9var.get(),b30_10var.get(),b30_11var.get(),b30_12var.get(),b30_13var.get(),b30_14var.get(),b30_15var.get(),trig_31var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed30)
    c1.set("gray84")
    nameb30_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b30_17var.get() == 1:
        return

#Beat 32
    c1.set("cyan")
    nameb31_0.configure(background=c1.get())
    GPIO.output(chan_list, (b31_0var.get(),b31_1var.get(),b31_2var.get(),b31_3var.get(),b31_4var.get(),b31_5var.get(),b31_6var.get(),b31_7var.get(), \
                            b31_8var.get(),b31_9var.get(),b31_10var.get(),b31_11var.get(),b31_12var.get(),b31_13var.get(),b31_14var.get(),b31_15var.get(),trig_32var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed31)
    c1.set("gray84")
    nameb31_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b31_17var.get() == 1:
        return

#Beat 33
    c1.set("cyan")
    nameb32_0.configure(background=c1.get())
    GPIO.output(chan_list, (b32_0var.get(),b32_1var.get(),b32_2var.get(),b32_3var.get(),b32_4var.get(),b32_5var.get(),b32_6var.get(),b32_7var.get(), \
                            b32_8var.get(),b32_9var.get(),b32_10var.get(),b32_11var.get(),b32_12var.get(),b32_13var.get(),b32_14var.get(),b32_15var.get(),trig_33var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed32)
    c1.set("gray84")
    nameb32_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b32_17var.get() == 1:
        return

#Beat 34
    c1.set("cyan")
    nameb33_0.configure(background=c1.get())
    GPIO.output(chan_list, (b33_0var.get(),b33_1var.get(),b33_2var.get(),b33_3var.get(),b33_4var.get(),b33_5var.get(),b33_6var.get(),b33_7var.get(), \
                            b33_8var.get(),b33_9var.get(),b33_10var.get(),b33_11var.get(),b33_12var.get(),b33_13var.get(),b33_14var.get(),b33_15var.get(),trig_34var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed33)
    c1.set("gray84")
    nameb33_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b33_17var.get() == 1:
        return

#Beat 35
    c1.set("cyan")
    nameb34_0.configure(background=c1.get())
    GPIO.output(chan_list, (b34_0var.get(),b34_1var.get(),b34_2var.get(),b34_3var.get(),b34_4var.get(),b34_5var.get(), b34_6var.get(),b34_7var.get(), \
                            b34_8var.get(),b34_9var.get(),b34_10var.get(),b34_11var.get(),b34_12var.get(),b34_13var.get(),b34_14var.get(),b34_15var.get(),trig_35var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed34)
    c1.set("gray84")
    nameb34_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b34_17var.get() == 1:
        return

#Beat 36
    c1.set("cyan")
    nameb35_0.configure(background=c1.get())
    GPIO.output(chan_list, (b35_0var.get(),b35_1var.get(),b35_2var.get(),b35_3var.get(),b35_4var.get(),b35_5var.get(),b35_6var.get(),b35_7var.get(), \
                            b35_8var.get(),b35_9var.get(),b35_10var.get(),b35_11var.get(),b35_12var.get(),b35_13var.get(),b35_14var.get(),b35_15var.get(),trig_36var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed35)
    c1.set("gray84")
    nameb35_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b35_17var.get() == 1:
        return

#Beat 37
    c1.set("cyan")
    nameb36_0.configure(background=c1.get())
    GPIO.output(chan_list, (b36_0var.get(),b36_1var.get(),b36_2var.get(),b36_3var.get(),b36_4var.get(),b36_5var.get(),b36_6var.get(),b36_7var.get(), \
                            b36_8var.get(),b36_9var.get(),b36_10var.get(),b36_11var.get(),b36_12var.get(),b36_13var.get(),b36_14var.get(),b36_15var.get(),trig_37var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed36)
    c1.set("gray84")
    nameb36_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b36_17var.get() == 1:
        return

#Beat 38
    c1.set("cyan")
    nameb37_0.configure(background=c1.get())
    GPIO.output(chan_list, (b37_0var.get(),b37_1var.get(),b37_2var.get(),b37_3var.get(),b37_4var.get(),b37_5var.get(),b37_6var.get(),b37_7var.get(), \
                            b37_8var.get(),b37_9var.get(),b37_10var.get(),b37_11var.get(),b37_12var.get(),b37_13var.get(),b37_14var.get(),b37_15var.get(),trig_38var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed37)
    c1.set("gray84")
    nameb37_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b37_17var.get() == 1:
        return

#Beat 39
    c1.set("cyan")
    nameb38_0.configure(background=c1.get())
    GPIO.output(chan_list, (b38_0var.get(),b38_1var.get(),b38_2var.get(),b38_3var.get(),b38_4var.get(),b38_5var.get(),b38_6var.get(),b38_7var.get(), \
                            b38_8var.get(),b38_9var.get(),b38_10var.get(),b38_11var.get(),b38_12var.get(),b38_13var.get(),b38_14var.get(),b38_15var.get(),trig_39var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed38)
    c1.set("gray84")
    nameb38_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b38_17var.get() == 1:
        return

#Beat 40
    c1.set("cyan")
    nameb39_0.configure(background=c1.get())
    GPIO.output(chan_list, (b39_0var.get(),b39_1var.get(),b39_2var.get(),b39_3var.get(),b39_4var.get(),b39_5var.get(),b39_6var.get(),b39_7var.get(), \
                            b39_8var.get(),b39_9var.get(),b39_10var.get(),b39_11var.get(),b39_12var.get(),b39_13var.get(),b39_14var.get(),b39_15var.get(),trig_40var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed39)
    c1.set("gray84")
    nameb39_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b39_17var.get() == 1:
        return

#Beat 41
    c1.set("cyan")
    nameb40_0.configure(background=c1.get())
    GPIO.output(chan_list, (b40_0var.get(),b40_1var.get(),b40_2var.get(),b40_3var.get(),b40_4var.get(),b40_5var.get(),b40_6var.get(),b40_7var.get(), \
                            b40_8var.get(),b40_9var.get(),b40_10var.get(),b40_11var.get(),b40_12var.get(),b40_13var.get(),b40_14var.get(),b40_15var.get(),trig_41var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed40)
    c1.set("gray84")
    nameb40_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b40_17var.get() == 1:
        return

#Beat 42
    c1.set("cyan")
    nameb41_0.configure(background=c1.get())
    GPIO.output(chan_list, (b41_0var.get(),b41_1var.get(),b41_2var.get(),b41_3var.get(),b41_4var.get(),b41_5var.get(),b41_6var.get(),b41_7var.get(), \
                            b41_8var.get(),b41_9var.get(),b41_10var.get(),b41_11var.get(),b41_12var.get(),b41_13var.get(),b41_14var.get(),b41_15var.get(),trig_41var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed41)
    c1.set("gray84")
    nameb41_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b41_17var.get() == 1:
        return

#Beat 43
    c1.set("cyan")
    nameb42_0.configure(background=c1.get())
    GPIO.output(chan_list, (b42_0var.get(),b42_1var.get(),b42_2var.get(),b42_3var.get(),b42_4var.get(),b42_5var.get(),b42_6var.get(),b42_7var.get(), \
                            b42_8var.get(),b42_9var.get(),b42_10var.get(),b42_11var.get(),b42_12var.get(),b42_13var.get(),b42_14var.get(),b42_15var.get(),trig_43var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed42)
    c1.set("gray84")
    nameb42_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b42_17var.get() == 1:
        return

#Beat 44
    c1.set("cyan")
    nameb43_0.configure(background=c1.get())
    GPIO.output(chan_list, (b43_0var.get(),b43_1var.get(),b43_2var.get(),b43_3var.get(),b43_4var.get(),b43_5var.get(),b43_6var.get(),b43_7var.get(), \
                            b43_8var.get(),b43_9var.get(),b43_10var.get(),b43_11var.get(),b43_12var.get(),b43_13var.get(),b43_14var.get(),b43_15var.get(),trig_44var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed43)
    c1.set("gray84")
    nameb43_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b43_17var.get() == 1:
        return

#Beat 45
    c1.set("cyan")
    nameb44_0.configure(background=c1.get())
    GPIO.output(chan_list, (b44_0var.get(),b44_1var.get(),b44_2var.get(),b44_3var.get(),b44_4var.get(),b44_5var.get(),b44_6var.get(),b44_7var.get(), \
                            b44_8var.get(),b44_9var.get(),b44_10var.get(),b44_11var.get(),b44_12var.get(),b44_13var.get(),b44_14var.get(),b44_15var.get(),trig_45var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed44)
    c1.set("gray84")
    nameb44_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b44_17var.get() == 1:
        return

#Beat 46
    c1.set("cyan")
    nameb45_0.configure(background=c1.get())
    GPIO.output(chan_list, (b45_0var.get(),b45_1var.get(),b45_2var.get(),b45_3var.get(),b45_4var.get(),b45_5var.get(),b45_6var.get(),b45_7var.get(), \
                            b45_8var.get(),b45_9var.get(),b45_10var.get(),b45_11var.get(),b45_12var.get(),b45_13var.get(),b45_14var.get(),b45_15var.get(),trig_46var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed45)
    c1.set("gray84")
    nameb45_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b45_17var.get() == 1:
        return

#Beat 47
    c1.set("cyan")
    nameb46_0.configure(background=c1.get())
    GPIO.output(chan_list, (b46_0var.get(),b46_1var.get(),b46_2var.get(),b46_3var.get(),b46_4var.get(),b46_5var.get(),b46_6var.get(),b46_7var.get(), \
                            b46_8var.get(),b46_9var.get(),b46_10var.get(),b46_11var.get(),b46_12var.get(),b46_13var.get(),b46_14var.get(),b46_15var.get(),trig_47var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed46)
    c1.set("gray84")
    nameb46_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b46_17var.get() == 1:
        return

#Beat 48
    c1.set("cyan")
    nameb47_0.configure(background=c1.get())
    GPIO.output(chan_list, (b47_0var.get(),b47_1var.get(),b47_2var.get(),b47_3var.get(),b47_4var.get(),b47_5var.get(),b47_6var.get(),b47_7var.get(), \
                            b47_8var.get(),b47_9var.get(),b47_10var.get(),b47_11var.get(),b47_12var.get(),b47_13var.get(),b47_14var.get(),b47_15var.get(),trig_48var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed47)
    c1.set("gray84")
    nameb47_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b47_17var.get() == 1:
        return

#Beat 49
    c1.set("cyan")
    nameb48_0.configure(background=c1.get())
    GPIO.output(chan_list, (b48_0var.get(),b48_1var.get(),b48_2var.get(),b48_3var.get(),b48_4var.get(),b48_5var.get(),b48_6var.get(),b48_7var.get(), \
                            b48_8var.get(),b48_9var.get(),b48_10var.get(),b48_11var.get(),b48_12var.get(),b48_13var.get(),b48_14var.get(),b48_15var.get(),trig_49var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed48)
    c1.set("gray84")
    nameb48_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b48_17var.get() == 1:
        return

#Beat 50
    c1.set("cyan")
    nameb49_0.configure(background=c1.get())
    GPIO.output(chan_list, (b49_0var.get(),b49_1var.get(),b49_2var.get(),b49_3var.get(),b49_4var.get(),b49_5var.get(),b49_6var.get(),b49_7var.get(), \
                            b49_8var.get(),b49_9var.get(),b49_10var.get(),b49_11var.get(),b49_12var.get(),b49_13var.get(),b49_14var.get(),b49_15var.get(),trig_50var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed49)
    c1.set("gray84")
    nameb49_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b49_17var.get() == 1:
        return

#Beat 51
    c1.set("cyan")
    nameb50_0.configure(background=c1.get())
    GPIO.output(chan_list, (b50_0var.get(),b50_1var.get(),b50_2var.get(),b50_3var.get(),b50_4var.get(),b50_5var.get(),b50_6var.get(),b50_7var.get(), \
                            b50_8var.get(),b50_9var.get(),b50_10var.get(),b50_11var.get(),b50_12var.get(),b50_13var.get(),b50_14var.get(),b50_15var.get(),trig_51var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed50)
    c1.set("gray84")
    nameb50_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b50_17var.get() == 1:
        return

#Beat 52
    c1.set("cyan")
    nameb51_0.configure(background=c1.get())
    GPIO.output(chan_list, (b51_0var.get(),b51_1var.get(),b51_2var.get(),b51_3var.get(),b51_4var.get(),b51_5var.get(),b51_6var.get(),b51_7var.get(), \
                            b51_8var.get(),b51_9var.get(),b51_10var.get(),b51_11var.get(),b51_12var.get(),b51_13var.get(),b51_14var.get(),b51_15var.get(),trig_51var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed51)
    c1.set("gray84")
    nameb51_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b51_17var.get() == 1:
        return

#Beat 53
    c1.set("cyan")
    nameb52_0.configure(background=c1.get())
    GPIO.output(chan_list, (b52_0var.get(),b52_1var.get(),b52_2var.get(),b52_3var.get(),b52_4var.get(),b52_5var.get(),b52_6var.get(),b52_7var.get(), \
                            b52_8var.get(),b52_9var.get(),b52_10var.get(),b52_11var.get(),b52_12var.get(),b52_13var.get(),b52_14var.get(),b52_15var.get(),trig_53var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed52)
    c1.set("gray84")
    nameb52_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b52_17var.get() == 1:
        return

#Beat 54
    c1.set("cyan")
    nameb53_0.configure(background=c1.get())
    GPIO.output(chan_list, (b53_0var.get(),b53_1var.get(),b53_2var.get(),b53_3var.get(),b53_4var.get(),b53_5var.get(),b53_6var.get(),b53_7var.get(), \
                            b53_8var.get(),b53_9var.get(),b53_10var.get(),b53_11var.get(),b53_12var.get(),b53_13var.get(),b53_14var.get(),b53_15var.get(),trig_54var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed53)
    c1.set("gray84")
    nameb53_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b53_17var.get() == 1:
        return

#Beat 55
    c1.set("cyan")
    nameb54_0.configure(background=c1.get())
    GPIO.output(chan_list, (b54_0var.get(),b54_1var.get(),b54_2var.get(),b54_3var.get(),b54_4var.get(),b54_5var.get(),b54_6var.get(),b54_7var.get(), \
                            b54_8var.get(),b54_9var.get(),b54_10var.get(),b54_11var.get(),b54_12var.get(),b54_13var.get(),b54_14var.get(),b54_15var.get(),trig_55var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed54)
    c1.set("gray84")
    nameb54_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b54_17var.get() == 1:
        return

#Beat 56
    c1.set("cyan")
    nameb55_0.configure(background=c1.get())
    GPIO.output(chan_list, (b55_0var.get(),b55_1var.get(),b55_2var.get(),b55_3var.get(),b55_4var.get(),b55_5var.get(),b55_6var.get(),b55_7var.get(), \
                            b55_8var.get(),b55_9var.get(),b55_10var.get(),b55_11var.get(),b55_12var.get(),b55_13var.get(),b55_14var.get(),b55_15var.get(),trig_56var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed55)
    c1.set("gray84")
    nameb55_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b55_17var.get() == 1:
        return

#Beat 57
    c1.set("cyan")
    nameb56_0.configure(background=c1.get())
    GPIO.output(chan_list, (b56_0var.get(),b56_1var.get(),b56_2var.get(),b56_3var.get(),b56_4var.get(),b56_5var.get(),b56_6var.get(),b56_7var.get(), \
                            b56_8var.get(),b56_9var.get(),b56_10var.get(),b56_11var.get(),b56_12var.get(),b56_13var.get(),b56_14var.get(),b56_15var.get(),trig_57var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed56)
    c1.set("gray84")
    nameb56_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b56_17var.get() == 1:
        return

#Beat 58
    c1.set("cyan")
    nameb57_0.configure(background=c1.get())
    GPIO.output(chan_list, (b57_0var.get(),b57_1var.get(),b57_2var.get(),b57_3var.get(),b57_4var.get(),b57_5var.get(),b57_6var.get(),b57_7var.get(), \
                            b57_8var.get(),b57_9var.get(),b57_10var.get(),b57_11var.get(),b57_12var.get(),b57_13var.get(),b57_14var.get(),b57_15var.get(),trig_58var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed57)
    c1.set("gray84")
    nameb57_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b57_17var.get() == 1:
        return

#Beat 59
    c1.set("cyan")
    nameb58_0.configure(background=c1.get())
    GPIO.output(chan_list, (b58_0var.get(),b58_1var.get(),b58_2var.get(),b58_3var.get(),b58_4var.get(),b58_5var.get(),b58_6var.get(),b58_7var.get(), \
                            b58_8var.get(),b58_9var.get(),b58_10var.get(),b58_11var.get(),b58_12var.get(),b58_13var.get(),b58_14var.get(),b58_15var.get(),trig_59var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed58)
    c1.set("gray84")
    nameb58_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b58_17var.get() == 1:
        return

#Beat 60
    c1.set("cyan")
    nameb59_0.configure(background=c1.get())
    GPIO.output(chan_list, (b59_0var.get(),b59_1var.get(),b59_2var.get(),b59_3var.get(),b59_4var.get(),b59_5var.get(),b59_6var.get(),b59_7var.get(), \
                            b59_8var.get(),b59_9var.get(),b59_10var.get(),b59_11var.get(),b59_12var.get(),b59_13var.get(),b59_14var.get(),b59_15var.get(),trig_60var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed59)
    c1.set("gray84")
    nameb59_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b59_17var.get() == 1:
        return

#Beat 61
    c1.set("cyan")
    nameb60_0.configure(background=c1.get())
    GPIO.output(chan_list, (b60_0var.get(),b60_1var.get(),b60_2var.get(),b60_3var.get(),b60_4var.get(),b60_5var.get(),b60_6var.get(),b60_7var.get(), \
                            b60_8var.get(),b60_9var.get(),b60_10var.get(),b60_11var.get(),b60_12var.get(),b60_13var.get(),b60_14var.get(),b60_15var.get(),trig_61var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed60)
    c1.set("gray84")
    nameb60_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b60_17var.get() == 1:
        return

#Beat 62
    c1.set("cyan")
    nameb61_0.configure(background=c1.get())
    GPIO.output(chan_list, (b61_0var.get(),b61_1var.get(),b61_2var.get(),b61_3var.get(),b61_4var.get(),b61_5var.get(),b61_6var.get(),b61_7var.get(), \
                            b61_8var.get(),b61_9var.get(),b61_10var.get(),b61_11var.get(),b61_12var.get(),b61_13var.get(),b61_14var.get(),b61_15var.get(),trig_62var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed61)
    c1.set("gray84")
    nameb61_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b61_17var.get() == 1:
        return

#Beat 63
    c1.set("cyan")
    nameb62_0.configure(background=c1.get())
    GPIO.output(chan_list, (b62_0var.get(),b62_1var.get(),b62_2var.get(),b62_3var.get(),b62_4var.get(),b62_5var.get(),b62_6var.get(),b62_7var.get(), \
                            b62_8var.get(),b62_9var.get(),b62_10var.get(),b62_11var.get(),b62_12var.get(),b62_13var.get(),b62_14var.get(),b62_15var.get(),trig_63var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed62)
    c1.set("gray84")
    nameb62_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b62_17var.get() == 1:
        return

#Beat 64
    c1.set("cyan")
    nameb63_0.configure(background=c1.get())
    GPIO.output(chan_list, (b63_0var.get(),b63_1var.get(),b63_2var.get(),b63_3var.get(),b63_4var.get(),b63_5var.get(),b63_6var.get(),b63_7var.get(), \
                            b63_8var.get(),b63_9var.get(),b63_10var.get(),b63_11var.get(),b63_12var.get(),b63_13var.get(),b63_14var.get(),b63_15var.get(),trig_64var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed63)
    c1.set("gray84")
    nameb63_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b63_17var.get() == 1:
        return

#Beat 65
    c1.set("cyan")
    nameb64_0.configure(background=c1.get())
    GPIO.output(chan_list, (b64_0var.get(),b64_1var.get(),b64_2var.get(),b64_3var.get(),b64_4var.get(),b64_5var.get(),b64_6var.get(),b64_7var.get(), \
                            b64_8var.get(),b64_9var.get(),b64_10var.get(),b64_11var.get(),b64_12var.get(),b64_13var.get(),b64_14var.get(),b64_15var.get(),trig_65var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed64)
    c1.set("gray84")
    nameb64_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b64_17var.get() == 1:
        return

#Beat 66
    c1.set("cyan")
    nameb65_0.configure(background=c1.get())
    GPIO.output(chan_list, (b65_0var.get(),b65_1var.get(),b65_2var.get(),b65_3var.get(),b65_4var.get(),b65_5var.get(),b65_6var.get(),b65_7var.get(), \
                            b65_8var.get(),b65_9var.get(),b65_10var.get(),b65_11var.get(),b65_12var.get(),b65_13var.get(),b65_14var.get(),b65_15var.get(),trig_66var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed65)
    c1.set("gray84")
    nameb65_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b65_17var.get() == 1:
        return

#Beat 67
    c1.set("cyan")
    nameb66_0.configure(background=c1.get())
    GPIO.output(chan_list, (b66_0var.get(),b66_1var.get(),b66_2var.get(),b66_3var.get(),b66_4var.get(),b66_5var.get(),b66_6var.get(),b66_7var.get(), \
                            b66_8var.get(),b66_9var.get(),b66_10var.get(),b66_11var.get(),b66_12var.get(),b66_13var.get(),b66_14var.get(),b66_15var.get(),trig_67var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed66)
    c1.set("gray84")
    nameb66_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b66_17var.get() == 1:
        return

#Beat 68
    c1.set("cyan")
    nameb67_0.configure(background=c1.get())
    GPIO.output(chan_list, (b67_0var.get(),b67_1var.get(),b67_2var.get(),b67_3var.get(),b67_4var.get(),b67_5var.get(),b67_6var.get(),b67_7var.get(), \
                            b67_8var.get(),b67_9var.get(),b67_10var.get(),b67_11var.get(),b67_12var.get(),b67_13var.get(),b67_14var.get(),b67_15var.get(),trig_68var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed67)
    c1.set("gray84")
    nameb67_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b67_17var.get() == 1:
        return

#Beat 69
    c1.set("cyan")
    nameb68_0.configure(background=c1.get())
    GPIO.output(chan_list, (b68_0var.get(),b68_1var.get(),b68_2var.get(),b68_3var.get(),b68_4var.get(),b68_5var.get(),b68_6var.get(),b68_7var.get(), \
                            b68_8var.get(),b68_9var.get(),b68_10var.get(),b68_11var.get(),b68_12var.get(),b68_13var.get(),b68_14var.get(),b68_15var.get(),trig_69var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed68)
    c1.set("gray84")
    nameb68_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b68_17var.get() == 1:
        return

#Beat 70
    c1.set("cyan")
    nameb69_0.configure(background=c1.get())
    GPIO.output(chan_list, (b69_0var.get(),b69_1var.get(),b69_2var.get(),b69_3var.get(),b69_4var.get(),b69_5var.get(),b69_6var.get(),b69_7var.get(), \
                            b69_8var.get(),b69_9var.get(),b69_10var.get(),b69_11var.get(),b69_12var.get(),b69_13var.get(),b69_14var.get(),b69_15var.get(),trig_70var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed69)
    c1.set("gray84")
    nameb69_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b69_17var.get() == 1:
        return

#Beat 71
    c1.set("cyan")
    nameb70_0.configure(background=c1.get())
    GPIO.output(chan_list, (b70_0var.get(),b70_1var.get(),b70_2var.get(),b70_3var.get(),b70_4var.get(),b70_5var.get(),b70_6var.get(),b70_7var.get(), \
                            b70_8var.get(),b70_9var.get(),b70_10var.get(),b70_11var.get(),b70_12var.get(),b70_13var.get(),b70_14var.get(),b70_15var.get(),trig_71var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed70)
    c1.set("gray84")
    nameb70_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b70_17var.get() == 1:
        return

#Beat 72
    c1.set("cyan")
    nameb71_0.configure(background=c1.get())
    GPIO.output(chan_list, (b71_0var.get(),b71_1var.get(),b71_2var.get(),b71_3var.get(),b71_4var.get(),b71_5var.get(),b71_6var.get(),b71_7var.get(), \
                            b71_8var.get(),b71_9var.get(),b71_10var.get(),b71_11var.get(),b71_12var.get(),b71_13var.get(),b71_14var.get(),b71_15var.get(),trig_72var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed71)
    c1.set("gray84")
    nameb71_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b71_17var.get() == 1:
        return

#Beat 73
    c1.set("cyan")
    nameb72_0.configure(background=c1.get())
    GPIO.output(chan_list, (b72_0var.get(),b72_1var.get(),b72_2var.get(),b72_3var.get(),b72_4var.get(),b72_5var.get(),b72_6var.get(),b72_7var.get(), \
                            b72_8var.get(),b72_9var.get(),b72_10var.get(),b72_11var.get(),b72_12var.get(),b72_13var.get(),b72_14var.get(),b72_15var.get(),trig_73var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed72)
    c1.set("gray84")
    nameb72_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b72_17var.get() == 1:
        return

#Beat 74
    c1.set("cyan")
    nameb73_0.configure(background=c1.get())
    GPIO.output(chan_list, (b73_0var.get(),b73_1var.get(),b73_2var.get(),b73_3var.get(),b73_4var.get(),b73_5var.get(),b73_6var.get(),b73_7var.get(), \
                            b73_8var.get(),b73_9var.get(),b73_10var.get(),b73_11var.get(),b73_12var.get(),b73_13var.get(),b73_14var.get(),b73_15var.get(),trig_74var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed73)
    c1.set("gray84")
    nameb73_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b73_17var.get() == 1:
        return

#Beat 75
    c1.set("cyan")
    nameb74_0.configure(background=c1.get())
    GPIO.output(chan_list, (b74_0var.get(),b74_1var.get(),b74_2var.get(),b74_3var.get(),b74_4var.get(),b74_5var.get(),b74_6var.get(),b74_7var.get(), \
                            b74_8var.get(),b74_9var.get(),b74_10var.get(),b74_11var.get(),b74_12var.get(),b74_13var.get(),b74_14var.get(),b74_15var.get(),trig_75var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed74)
    c1.set("gray84")
    nameb74_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b74_17var.get() == 1:
        return

#Beat 76
    c1.set("cyan")
    nameb75_0.configure(background=c1.get())
    GPIO.output(chan_list, (b75_0var.get(),b75_1var.get(),b75_2var.get(),b75_3var.get(),b75_4var.get(),b75_5var.get(),b75_6var.get(),b75_7var.get(), \
                            b75_8var.get(),b75_9var.get(),b75_10var.get(),b75_11var.get(),b75_12var.get(),b75_13var.get(),b75_14var.get(),b75_15var.get(),trig_76var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed75)
    c1.set("gray84")
    nameb75_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b75_17var.get() == 1:
        return

#Beat 77
    c1.set("cyan")
    nameb76_0.configure(background=c1.get())
    GPIO.output(chan_list, (b76_0var.get(),b76_1var.get(),b76_2var.get(),b76_3var.get(),b76_4var.get(),b76_5var.get(),b76_6var.get(),b76_7var.get(), \
                            b76_8var.get(),b76_9var.get(),b76_10var.get(),b76_11var.get(),b76_12var.get(),b76_13var.get(),b76_14var.get(),b76_15var.get(),trig_77var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed76)
    c1.set("gray84")
    nameb76_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b76_17var.get() == 1:
        return

#Beat 78
    c1.set("cyan")
    nameb77_0.configure(background=c1.get())
    GPIO.output(chan_list, (b77_0var.get(),b77_1var.get(),b77_2var.get(),b77_3var.get(),b77_4var.get(),b77_5var.get(),b77_6var.get(),b77_7var.get(), \
                            b77_8var.get(),b77_9var.get(),b77_10var.get(),b77_11var.get(),b77_12var.get(),b77_13var.get(),b77_14var.get(),b77_15var.get(),trig_78var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed77)
    c1.set("gray84")
    nameb77_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b77_17var.get() == 1:
        return

#Beat 79
    c1.set("cyan")
    nameb78_0.configure(background=c1.get())
    GPIO.output(chan_list, (b78_0var.get(),b78_1var.get(),b78_2var.get(),b78_3var.get(),b78_4var.get(),b78_5var.get(),b78_6var.get(),b78_7var.get(), \
                            b78_8var.get(),b78_9var.get(),b78_10var.get(),b78_11var.get(),b78_12var.get(),b78_13var.get(),b78_14var.get(),b78_15var.get(),trig_79var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed78)
    c1.set("gray84")
    nameb78_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b78_17var.get() == 1:
        return

#Beat 80
    c1.set("cyan")
    nameb79_0.configure(background=c1.get())
    GPIO.output(chan_list, (b79_0var.get(),b79_1var.get(),b79_2var.get(),b79_3var.get(),b79_4var.get(),b79_5var.get(),b79_6var.get(),b79_7var.get(), \
                            b79_8var.get(),b79_9var.get(),b79_10var.get(),b79_11var.get(),b79_12var.get(),b79_13var.get(),b79_14var.get(),b79_15var.get(),trig_80var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed79)
    c1.set("gray84")
    nameb79_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b79_17var.get() == 1:
        return

#Beat 81
    c1.set("cyan")
    nameb80_0.configure(background=c1.get())
    GPIO.output(chan_list, (b80_0var.get(),b80_1var.get(),b80_2var.get(),b80_3var.get(),b80_4var.get(),b80_5var.get(),b80_6var.get(),b80_7var.get(), \
                            b80_8var.get(),b80_9var.get(),b80_10var.get(),b80_11var.get(),b80_12var.get(),b80_13var.get(),b80_14var.get(),b80_15var.get(),trig_81var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed80)
    c1.set("gray84")
    nameb80_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b80_17var.get() == 1:
        return

#Beat 82
    c1.set("cyan")
    nameb81_0.configure(background=c1.get())
    GPIO.output(chan_list, (b81_0var.get(),b81_1var.get(),b81_2var.get(),b81_3var.get(),b81_4var.get(),b81_5var.get(),b81_6var.get(),b81_7var.get(), \
                            b81_8var.get(),b81_9var.get(),b81_10var.get(),b81_11var.get(),b81_12var.get(),b81_13var.get(),b81_14var.get(),b81_15var.get(),trig_82var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed81)
    c1.set("gray84")
    nameb81_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b81_17var.get() == 1:
        return

#Beat 83
    c1.set("cyan")
    nameb82_0.configure(background=c1.get())
    GPIO.output(chan_list,(b82_0var.get(),b82_1var.get(),b82_2var.get(),b82_3var.get(),b82_4var.get(),b82_5var.get(),b82_6var.get(),b82_7var.get(), \
                            b82_8var.get(),b82_9var.get(),b82_10var.get(),b82_11var.get(),b82_12var.get(),b82_13var.get(),b82_14var.get(),b82_15var.get(),trig_83var.get())) 
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed82)
    c1.set("gray84")
    nameb82_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b82_17var.get() == 1:
        return

#Beat 84
    c1.set("cyan")
    nameb83_0.configure(background=c1.get())
    GPIO.output(chan_list, (b83_0var.get(),b83_1var.get(),b83_2var.get(),b83_3var.get(),b83_4var.get(),b83_5var.get(),b83_6var.get(),b83_7var.get(), \
                            b83_8var.get(),b83_9var.get(),b83_10var.get(),b83_11var.get(),b83_12var.get(),b83_13var.get(),b83_14var.get(),b83_15var.get(),trig_84var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed83)
    c1.set("gray84")
    nameb83_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b83_17var.get() == 1:
        return

#Beat 85
    c1.set("cyan")
    nameb84_0.configure(background=c1.get())
    GPIO.output(chan_list, (b84_0var.get(),b84_1var.get(),b84_2var.get(),b84_3var.get(),b84_4var.get(),b84_5var.get(),b84_6var.get(),b84_7var.get(), \
                            b84_8var.get(),b84_9var.get(),b84_10var.get(),b84_11var.get(),b84_12var.get(),b84_13var.get(),b84_14var.get(),b84_15var.get(),trig_85var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed84)
    c1.set("gray84")
    nameb84_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b84_17var.get() == 1:
        return

#Beat 86
    c1.set("cyan")
    nameb85_0.configure(background=c1.get())
    GPIO.output(chan_list, (b85_0var.get(),b85_1var.get(),b85_2var.get(),b85_3var.get(),b85_4var.get(),b85_5var.get(),b85_6var.get(),b85_7var.get(), \
                            b85_8var.get(),b85_9var.get(),b85_10var.get(),b85_11var.get(),b85_12var.get(),b85_13var.get(),b85_14var.get(),b85_15var.get(),trig_86var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed85)
    c1.set("gray84")
    nameb85_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b85_17var.get() == 1:
        return

#Beat 87
    c1.set("cyan")
    nameb86_0.configure(background=c1.get())
    GPIO.output(chan_list, (b86_0var.get(),b86_1var.get(),b86_2var.get(),b86_3var.get(),b86_4var.get(),b86_5var.get(),b86_6var.get(),b86_7var.get(), \
                            b86_8var.get(),b86_9var.get(),b86_10var.get(),b86_11var.get(),b86_12var.get(),b86_13var.get(),b86_14var.get(),b86_15var.get(),trig_87var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed86)
    c1.set("gray84")
    nameb86_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b86_17var.get() == 1:
        return

#Beat 88
    c1.set("cyan")
    nameb87_0.configure(background=c1.get())
    GPIO.output(chan_list, (b87_0var.get(),b87_1var.get(),b87_2var.get(),b87_3var.get(),b87_4var.get(),b87_5var.get(),b87_6var.get(),b87_7var.get(), \
                            b87_8var.get(),b87_9var.get(),b87_10var.get(),b87_11var.get(),b87_12var.get(),b87_13var.get(),b87_14var.get(),b87_15var.get(),trig_88var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed87)
    c1.set("gray84")
    nameb87_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b87_17var.get() == 1:
        return

#Beat 89
    c1.set("cyan")
    nameb88_0.configure(background=c1.get())
    GPIO.output(chan_list, (b88_0var.get(),b88_1var.get(),b88_2var.get(),b88_3var.get(),b88_4var.get(),b88_5var.get(),b88_6var.get(),b88_7var.get(), \
                            b88_8var.get(),b88_9var.get(),b88_10var.get(),b88_11var.get(),b88_12var.get(),b88_13var.get(),b88_14var.get(),b88_15var.get(),trig_89var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed88)
    c1.set("gray84")
    nameb88_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b88_17var.get() == 1:
        return

#Beat 90
    c1.set("cyan")
    nameb89_0.configure(background=c1.get())
    GPIO.output(chan_list, (b89_0var.get(),b89_1var.get(),b89_2var.get(),b89_3var.get(),b89_4var.get(),b89_5var.get(),b89_6var.get(),b89_7var.get(), \
                            b89_8var.get(),b89_9var.get(),b89_10var.get(),b89_11var.get(),b89_12var.get(),b89_13var.get(),b89_14var.get(),b89_15var.get(),trig_90var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed89)
    c1.set("gray84")
    nameb89_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b89_17var.get() == 1:
        return

#Beat 91
    c1.set("cyan")
    nameb90_0.configure(background=c1.get())
    GPIO.output(chan_list, (b90_0var.get(),b90_1var.get(),b90_2var.get(),b90_3var.get(),b90_4var.get(),b90_5var.get(),b90_6var.get(),b90_7var.get(), \
                            b90_8var.get(),b90_9var.get(),b90_10var.get(),b90_11var.get(),b90_12var.get(),b90_13var.get(),b90_14var.get(),b90_15var.get(),trig_91var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed90)
    c1.set("gray84")
    nameb90_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b90_17var.get() == 1:
        return

#Beat 92
    c1.set("cyan")
    nameb91_0.configure(background=c1.get())
    GPIO.output(chan_list, (b91_0var.get(),b91_1var.get(),b91_2var.get(),b91_3var.get(),b91_4var.get(),b91_5var.get(),b91_6var.get(),b91_7var.get(), \
                            b91_8var.get(),b91_9var.get(),b91_10var.get(),b91_11var.get(),b91_12var.get(),b91_13var.get(),b91_14var.get(),b91_15var.get(),trig_92var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed91)
    c1.set("gray84")
    nameb91_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b91_17var.get() == 1:
        return

#Beat 93
    c1.set("cyan")
    nameb92_0.configure(background=c1.get())
    GPIO.output(chan_list, (b92_0var.get(),b92_1var.get(),b92_2var.get(),b92_3var.get(),b92_4var.get(),b92_5var.get(),b92_6var.get(),b92_7var.get(), \
                            b92_8var.get(),b92_9var.get(),b92_10var.get(),b92_11var.get(),b92_12var.get(),b92_13var.get(),b92_14var.get(),b92_15var.get(),trig_93var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed92)
    c1.set("gray84")
    nameb92_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b92_17var.get() == 1:
        return

#Beat 94
    c1.set("cyan")
    nameb93_0.configure(background=c1.get())
    GPIO.output(chan_list, (b93_0var.get(),b93_1var.get(),b93_2var.get(),b93_3var.get(),b93_4var.get(),b93_5var.get(),b93_6var.get(),b93_7var.get(), \
                            b93_8var.get(),b93_9var.get(),b93_10var.get(),b93_11var.get(),b93_12var.get(),b93_13var.get(),b93_14var.get(),b93_15var.get(),trig_94var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed93)
    c1.set("gray84")
    nameb93_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b93_17var.get() == 1:
        return

#Beat 95
    c1.set("cyan")
    nameb94_0.configure(background=c1.get())
    GPIO.output(chan_list, (b94_0var.get(),b94_1var.get(),b94_2var.get(),b94_3var.get(),b94_4var.get(),b94_5var.get(),b94_6var.get(),b94_7var.get(), \
                            b94_8var.get(),b94_9var.get(),b94_10var.get(),b94_11var.get(),b94_12var.get(),b94_13var.get(),b94_14var.get(),b94_15var.get(),trig_95var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed94)
    c1.set("gray84")
    nameb94_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b94_17var.get() == 1:
        return

#Beat 96
    c1.set("cyan")
    nameb95_0.configure(background=c1.get())
    GPIO.output(chan_list, (b95_0var.get(),b95_1var.get(),b95_2var.get(),b95_3var.get(),b95_4var.get(),b95_5var.get(),b95_6var.get(),b95_7var.get(), \
                            b95_8var.get(),b95_9var.get(),b95_10var.get(),b95_11var.get(),b95_12var.get(),b95_13var.get(),b95_14var.get(),b95_15var.get(),trig_96var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed95)
    c1.set("gray84")
    nameb95_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b95_17var.get() == 1:
        return

#Beat 97
    c1.set("cyan")
    nameb96_0.configure(background=c1.get())
    GPIO.output(chan_list, (b96_0var.get(),b96_1var.get(),b96_2var.get(),b96_3var.get(),b96_4var.get(),b96_5var.get(),b96_6var.get(),b96_7var.get(), \
                            b96_8var.get(),b96_9var.get(),b96_10var.get(),b96_11var.get(),b96_12var.get(),b96_13var.get(),b96_14var.get(),b96_15var.get(),trig_97var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed96)
    c1.set("gray84")
    nameb96_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b96_17var.get() == 1:
        return

#Beat 98
    c1.set("cyan")
    nameb97_0.configure(background=c1.get())
    GPIO.output(chan_list, (b97_0var.get(),b97_1var.get(),b97_2var.get(),b97_3var.get(),b97_4var.get(),b97_5var.get(),b97_6var.get(),b97_7var.get(), \
                            b97_8var.get(),b97_9var.get(),b97_10var.get(),b97_11var.get(),b97_12var.get(),b97_13var.get(),b97_14var.get(),b97_15var.get(),trig_98var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed97)
    c1.set("gray84")
    nameb97_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b97_17var.get() == 1:
        return

#Beat 99
    c1.set("cyan")
    nameb98_0.configure(background=c1.get())
    GPIO.output(chan_list, (b98_0var.get(),b98_1var.get(),b98_2var.get(),b98_3var.get(),b98_4var.get(),b98_5var.get(),b98_6var.get(),b98_7var.get(), \
                            b98_8var.get(),b98_9var.get(),b98_10var.get(),b98_11var.get(),b98_12var.get(),b98_13var.get(),b98_14var.get(),b98_15var.get(),trig_99var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed98)
    c1.set("gray84")
    nameb98_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b98_17var.get() == 1:
        return

#Beat 100
    c1.set("cyan")
    nameb99_0.configure(background=c1.get())
    GPIO.output(chan_list, (b99_0var.get(),b99_1var.get(),b99_2var.get(),b99_3var.get(),b99_4var.get(),b99_5var.get(),b99_6var.get(),b99_7var.get(), \
                            b99_8var.get(),b99_9var.get(),b99_10var.get(),b99_11var.get(),b99_12var.get(),b99_13var.get(),b99_14var.get(),b99_15var.get(),trig_100var.get()))
    time.sleep(0.005)
    GPIO.output(chan_list, (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
    time.sleep(speed99)
    c1.set("gray84")
    nameb99_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b99_17var.get() == 1:
        return

def start():
    if stop_var.get()== 1:
        stop_0.invoke()

    def loop_0():

        def loop_1():
            global counter, loop
            if stop_var.get()== 1:
                counter=loop
                return
            play()
            time.sleep(repeat)
            counter=counter-1
            if counter==1:
                counter=loop
                return
            else:
                loop_1()
        loop_1()

    def run():
        global counter, loop
        while True:
            if stop_var.get()== 1:
                stop_0.invoke()
                return

            if loop_var.get() == 1:
                counter=loop
                if counter==1:
                    None
                else:
                    loop_0()

            if b0_16var.get() == 1:                
                time.sleep(repeat)
                play()
            else:
                if stop_var.get()== 1:
                    counter=loop
                    stop_0.invoke()
                    return
                play()
                return
    t = threading.Thread(target=run)
    t.daemon=True
    t.start()


def stop():

    def halt():
        if stop_var.get() == 0:
            stop_0.invoke()

    t1 = threading.Thread(target=halt)
    t1.daemon=True
    t1.start()

# to ensure only one loop button can be selected
def toggle_inf():
    if loop_var.get() and b0_16var.get() == 1:
        b0_16.invoke()

def toggle_loop():
    if loop_var.get() and b0_16var.get() == 1:
        loop_0.invoke()

#To start/stop Synthesiser sequencer
def synthstart():
    GPIO.output(trig, 1)
    time.sleep(0.05)
    GPIO.output(trig, 0)

def synthstop():
    GPIO.output(10, 1)
    time.sleep(0.005)
    GPIO.output(10, 0)


#tracking tempo
def haltcount():
    global haltno
    haltno=1
    if b0_17var.get()>0:
        return
    haltno=2
    if b1_17var.get()>0:
        return
    haltno=3
    if b2_17var.get()>0:
        return
    haltno=4
    if b3_17var.get()>0:
        return
    haltno=5
    if b4_17var.get()>0:
        return
    haltno=6
    if b5_17var.get()>0:
        return
    haltno=17
    if b6_17var.get()>0:
        return
    haltno=8
    if b7_17var.get()>0:
        return
    haltno=9
    if b8_17var.get()>0:
        return
    haltno=10
    if b9_17var.get()>0:
        return
    haltno=11
    if b10_17var.get()>0:
        return
    haltno=12
    if b11_17var.get()>0:
        return
    haltno=13
    if b12_17var.get()>0:
        return
    haltno=14
    if b13_17var.get()>0:
        return
    haltno=15
    if b14_17var.get()>0:
        return
    haltno=16
    if b15_17var.get()>0:
        return
    haltno=17
    if b16_17var.get()>0:
        return
    haltno=18
    if b17_7var.get()>0:
        return
    haltno=19
    if b18_17var.get()>0:
        return
    haltno=20
    if b19_17var.get()>0:
        return
    haltno=21
    if b20_17var.get()>0:
        return
    haltno=22
    if b21_17var.get()>0:
        return
    haltno=23
    if b22_17var.get()>0:
        return
    haltno=24
    if b23_17var.get()>0:
        return
    haltno=25
    if b24_17var.get()>0:
        return
    haltno=26
    if b25_17var.get()>0:
        return
    haltno=27
    if b26_17var.get()>0:
        return
    haltno=28
    if b27_17var.get()>0:
        return
    haltno=29
    if b28_17var.get()>0:
        return
    haltno=30
    if b29_17var.get()>0:
        return
    haltno=31
    if b30_17var.get()>0:
        return
    haltno=32
    if b31_17var.get()>0:
        return
    haltno=33
    if b32_17var.get()>0:
        return
    haltno=34
    if b33_17var.get()>0:
        return
    haltno=35
    if b34_17var.get()>0:
        return
    haltno=36
    if b35_17var.get()>0:
        return
    haltno=37
    if b36_17var.get()>0:
        return
    haltno=38
    if b37_17var.get()>0:
        return
    haltno=39
    if b40_17var.get()>0:
        return
    haltno=40
    if b39_17var.get()>0:
        return
    haltno=41
    if b40_17var.get()>0:
        return
    haltno=42
    if b41_17var.get()>0:
        return
    haltno=43
    if b42_17var.get()>0:
        return
    haltno=44
    if b43_17var.get()>0:
        return
    haltno=45
    if b44_17var.get()>0:
        return
    haltno=46
    if b45_17var.get()>0:
        return
    haltno=47
    if b46_17var.get()>0:
        return
    haltno=48
    if b47_17var.get()>0:
        return
    haltno=49
    if b48_17var.get()>0:
        return
    haltno=50
    if b49_17var.get()>0:
        return
    haltno=51
    if b50_17var.get()>0:
        return
    haltno=52
    if b51_17var.get()>0:
        return
    haltno=53
    if b52_17var.get()>0:
        return
    haltno=54
    if b53_17var.get()>0:
        return
    haltno=55
    if b54_17var.get()>0:
        return
    haltno=56
    if b55_17var.get()>0:
        return
    haltno=57
    if b56_17var.get()>0:
        return
    haltno=58
    if b57_17var.get()>0:
        return
    haltno=59
    if b58_17var.get()>0:
        return
    haltno=60
    if b59_17var.get()>0:
        return
    haltno=61
    if b60_17var.get()>0:
        return
    haltno=62
    if b61_17var.get()>0:
        return
    haltno=63
    if b62_17var.get()>0:
        return
    haltno=64
    if b63_17var.get()>0:
        return
    haltno=65
    if b64_17var.get()>0:
        return
    haltno=66
    if b65_17var.get()>0:
        return
    haltno=67
    if b66_17var.get()>0:
        return
    haltno=68
    if b67_17var.get()>0:
        return
    haltno=69
    if b68_17var.get()>0:
        return
    haltno=70
    if b69_17var.get()>0:
        return
    haltno=71
    if b70_17var.get()>0:
        return
    haltno=72
    if b71_17var.get()>0:
        return
    haltno=73
    if b72_17var.get()>0:
        return
    haltno=74
    if b73_17var.get()>0:
        return
    haltno=75
    if b74_17var.get()>0:
        return
    haltno=76
    if b75_17var.get()>0:
        return
    haltno=77
    if b66_17var.get()>0:
        return
    haltno=78
    if b77_17var.get()>0:
        return
    haltno=79
    if b78_17var.get()>0:
        return
    haltno=80
    if b79_17var.get()>0:
        return
    haltno=81
    if b80_17var.get()>0:
        return
    haltno=82
    if b81_17var.get()>0:
        return
    haltno=83
    if b82_17var.get()>0:
        return
    haltno=84
    if b83_17var.get()>0:
        return
    haltno=85
    if b84_17var.get()>0:
        return
    haltno=86
    if b85_17var.get()>0:
        return
    haltno=87
    if b86_17var.get()>0:
        return
    haltno=88
    if b87_17var.get()>0:
        return
    haltno=89
    if b88_17var.get()>0:
        return
    haltno=90
    if b89_17var.get()>0:
        return
    haltno=91
    if b90_17var.get()>0:
        return
    haltno=92
    if b91_17var.get()>0:
        return
    haltno=93
    if b92_17var.get()>0:
        return
    haltno=94
    if b93_17var.get()>0:
        return
    haltno=95
    if b94_17var.get()>0:
        return
    haltno=96
    if b95_17var.get()>0:
        return
    haltno=97
    if b96_17var.get()>0:
        return
    haltno=98
    if b97_17var.get()>0:
        return
    haltno=99
    if b98_17var.get()>0:
        return
    haltno=100
    if b99_17var.get()>0:
        return

def trackup():
    haltcount()
    if trackdis_var.get()>0:
        GPIO.output(9, 1)
        time.sleep(0.005)
        GPIO.output(9, 0)
        print 'trig up'
    if trackdis_var.get()==0:
        None
    trackno=0
    if trackno==haltno:
        return
    else:
        trackno=1
        f0()
    if trackno==haltno:
        return
    else:
        trackno=2
        f1()
    if trackno==haltno:
        return
    else:
        trackno=3
        f2()
    if trackno==haltno:    
        return
    else:
        trackno=4
        f3()
    if trackno==haltno:
        return
    else:
        trackno=5
        f4()
    if trackno==haltno:
        return
    else:
        trackno=6
        f5()
    if trackno==haltno:
        return
    else:
        trackno=7
        f6()
    if trackno==haltno:
        return
    else:
        trackno=8
        f7()
    if trackno==haltno:
        return
    else:
        trackno=9
        f8()
    if trackno==haltno:
        return
    else:
        trackno=10
        f9()
    if trackno==haltno:
        return
    else:
        trackno=11
        f10()
    if trackno==haltno:
        return
    else:
        trackno=12
        f11()
    if trackno==haltno:
        return
    else:
        trackno=13
        f12()
    if trackno==haltno:
        return
    else:
        trackno=14
        f13()
    if trackno==haltno:
        return
    else:
        trackno=15
        f14()
    if trackno==haltno:
        return
    else:
        trackno=16
        f15()
    if trackno==haltno:
        return
    else:
        trackno=17
        f16()
    if trackno==haltno:
        return
    else:
        trackno=18
        f17()
    if trackno==haltno:
        return
    else:
        trackno=19
        f18()
    if trackno==haltno:
        return
    else:
        trackno=20
        f19()
    if trackno==haltno:
        return
    else:
        trackno=21
        f20()
    if trackno==haltno:
        return
    else:
        trackno=22
        f21()
    if trackno==haltno:
        return
    else:
        trackno=23
        f22()
    if trackno==haltno:
        return
    else:
        trackno=24
        f23()
    if trackno==haltno:
        return
    else:
        trackno=25
        f24()
    if trackno==haltno:
        return
    else:
        trackno=26
        f25()
    if trackno==haltno:
        return
    else:
        trackno=27
        f26()
    if trackno==haltno:
        return
    else:
        trackno=28
        f27()
    if trackno==haltno:
        return
    else:
        trackno=29
        f28()
    if trackno==haltno:
        return
    else:
        trackno=30
        f29()
    if trackno==haltno:
        return
    else:
        trackno=31
        f30()
    if trackno==haltno:
        return
    else:
        trackno=32
        f31()
    if trackno==haltno:
        return
    else:
        trackno=33
        f32()
    if trackno==haltno:
        return
    else:
        trackno=34
        f33()
    if trackno==haltno:
        return
    else:
        trackno=35
        f34()
    if trackno==haltno:
        return
    else:
        trackno=36
        f35()
    if trackno==haltno:
        return
    else:
        trackno=37
        f36()
    if trackno==haltno:
        return
    else:
        trackno=38
        f37()
    if trackno==haltno:
        return
    else:
        trackno=39
        f38()
    if trackno==haltno:
        return
    else:
        trackno=40
        f39()
    if trackno==haltno:
        return
    else:
        trackno=41
        f40()
    if trackno==haltno:
        return
    else:
        trackno=42
        f41()
    if trackno==haltno:
        return
    else:
        trackno=43
        f42()
    if trackno==haltno:
        return
    else:
        trackno=44
        f43()
    if trackno==haltno:
        return
    else:
        trackno=45
        f44()
    if trackno==haltno:
        return
    else:
        trackno=46
        f45()
    if trackno==haltno:
        return
    else:
        trackno=47
        f46()
    if trackno==haltno:
        return
    else:
        trackno=48
        f47()
    if trackno==haltno:
        return
    else:
        trackno=49
        f48()
    if trackno==haltno:
        return
    else:
        trackno=50
        f49()
    if trackno==haltno:
        return
    else:
        trackno=51
        f50()
    if trackno==haltno:
        return
    else:
        trackno=52
        f51()
    if trackno==haltno:
        return
    else:
        trackno=53
        f52()
    if trackno==haltno:
        return
    else:
        trackno=54
        f53()
    if trackno==haltno:
        return
    else:
        trackno=55
        f54()
    if trackno==haltno:
        return
    else:
        trackno=56
        f55()
    if trackno==haltno:
        return
    else:
        trackno=57
        f56()
    if trackno==haltno:
        return
    else:
        trackno=58
        f57()
    if trackno==haltno:
        return
    else:
        trackno=59
        f58()
    if trackno==haltno:
        return
    else:
        trackno=60
        f59()
    if trackno==haltno:
        return
    else:
        trackno=61
        f60()
    if trackno==haltno:
        return
    else:
        trackno=62
        f61()
    if trackno==haltno:
        return
    else:
        trackno=63
        f62()
    if trackno==haltno:
        return
    else:
        trackno=64
        f63()
    if trackno==haltno:
        return
    else:
        trackno=65
        f64()
    if trackno==haltno:
        return
    else:
        trackno=66
        f65()
    if trackno==haltno:
        return
    else:
        trackno=67
        f66()
    if trackno==haltno:
        return
    else:
        trackno=68
        f67()
    if trackno==haltno:
        return
    else:
        trackno=69
        f68()
    if trackno==haltno:
        return
    else:
        trackno=70
        f69()    
    if trackno==haltno:
        return
    else:
        trackno=71
        f70()
    if trackno==haltno:
        return
    else:
        trackno=72
        f71()
    if trackno==haltno:
        return
    else:
        trackno=73
        f72()
    if trackno==haltno:
        return
    else:
        trackno=74
        f73()
    if trackno==haltno:
        return
    else:
        trackno=75
        f74()
    if trackno==haltno:
        return
    else:
        trackno=76
        f75()
    if trackno==haltno:
        return
    else:
        trackno=77
        f76()
    if trackno==haltno:
        return
    else:
        trackno=78
        f77()
    if trackno==haltno:
        return
    else:
        trackno=79
        f78()
    if trackno==haltno:
        return
    else:
        trackno=80
        f79()
    if trackno==haltno:
        return
    else:
        trackno=81
        f80()
    if trackno==haltno:
        return
    else:
        trackno=82
        f81()
    if trackno==haltno:
        return
    else:
        trackno=83
        f82()
    if trackno==haltno:
        return
    else:
        trackno=84
        f83()
    if trackno==haltno:
        return
    else:
        trackno=85
        f84()
    if trackno==haltno:
        return
    else:
        trackno=86
        f85()
    if trackno==haltno:
        return
    else:
        trackno=86
        f86()
    if trackno==haltno:
        return
    else:
        trackno=87
        f87()
    if trackno==haltno:
        return
    else:
        trackno=88
        f88()
    if trackno==haltno:
        return
    else:
        trackno=89
        f89()
    if trackno==haltno:
        return
    else:
        trackno=90
        f90()
    if trackno==haltno:
        return
    else:
        trackno=92
        f91()
    if trackno==haltno:
        return
    else:
        trackno=93
        f92()
    if trackno==haltno:
        return
    else:
        trackno=94
        f93()
    if trackno==haltno:
        return
    else:
        trackno=95
        f94()
    if trackno==haltno:
        return
    else:
        trackno=96
        f95()
    if trackno==haltno:
        return
    else:
        trackno=97
        f96()
    if trackno==haltno:
        return
    else:
        trackno=98
        f97()
    if trackno==haltno:
        return
    else:
        trackno=99
        f98()
    if trackno==haltno:
        return
    else:
        trackno=100
        f99()

def trackdn():
    haltcount()
    if trackdis_var.get()>0:
        GPIO.output(11, 1)
        time.sleep(0.005)
        GPIO.output(11, 0)
        print 'trig dn'
    if trackdis_var.get()==0:
        None
    trackno=0
    if trackno==haltno:
        return
    else:
        trackno=1
        s0()
    if trackno==haltno:
        return
    else:
        trackno=2
        s1()
    if trackno==haltno:
        return
    else:
        trackno=3
        s2()
    if trackno==haltno:    
        return
    else:
        trackno=4
        s3()
    if trackno==haltno:
        return
    else:
        trackno=5
        s4()
    if trackno==haltno:
        return
    else:
        trackno=6
        s5()
    if trackno==haltno:
        return
    else:
        trackno=7
        s6()
    if trackno==haltno:
        return
    else:
        trackno=8
        s7()
    if trackno==haltno:
        return
    else:
        trackno=9
        s8()
    if trackno==haltno:
        return
    else:
        trackno=10
        s9()
    if trackno==haltno:
        return
    else:
        trackno=11
        s10()
    if trackno==haltno:
        return
    else:
        trackno=12
        s11()
    if trackno==haltno:
        return
    else:
        trackno=13
        s12()
    if trackno==haltno:
        return
    else:
        trackno=14
        s13()
    if trackno==haltno:
        return
    else:
        trackno=15
        s14()
    if trackno==haltno:
        return
    else:
        trackno=16
        s15()
    if trackno==haltno:
        return
    else:
        trackno=17
        s16()
    if trackno==haltno:
        return
    else:
        trackno=18
        s17()
    if trackno==haltno:
        return
    else:
        trackno=19
        s18()
    if trackno==haltno:
        return
    else:
        trackno=20
        s19()
    if trackno==haltno:
        return
    else:
        trackno=21
        s20()
    if trackno==haltno:
        return
    else:
        trackno=22
        s21()
    if trackno==haltno:
        return
    else:
        trackno=23
        s22()
    if trackno==haltno:
        return
    else:
        trackno=24
        s23()
    if trackno==haltno:
        return
    else:
        trackno=25
        s24()
    if trackno==haltno:
        return
    else:
        trackno=26
        s25()
    if trackno==haltno:
        return
    else:
        trackno=27
        s26()
    if trackno==haltno:
        return
    else:
        trackno=28
        s27()
    if trackno==haltno:
        return
    else:
        trackno=29
        s28()
    if trackno==haltno:
        return
    else:
        trackno=30
        s29()
    if trackno==haltno:
        return
    else:
        trackno=31
        s30()
    if trackno==haltno:
        return
    else:
        trackno=32
        s31()
    if trackno==haltno:
        return
    else:
        trackno=33
        s32()
    if trackno==haltno:
        return
    else:
        trackno=34
        s33()
    if trackno==haltno:
        return
    else:
        trackno=35
        s34()
    if trackno==haltno:
        return
    else:
        trackno=36
        s35()
    if trackno==haltno:
        return
    else:
        trackno=37
        s36()
    if trackno==haltno:
        return
    else:
        trackno=38
        s37()
    if trackno==haltno:
        return
    else:
        trackno=39
        s38()
    if trackno==haltno:
        return
    else:
        trackno=40
        s39()
    if trackno==haltno:
        return
    else:
        trackno=41
        s40()
    if trackno==haltno:
        return
    else:
        trackno=42
        s41()
    if trackno==haltno:
        return
    else:
        trackno=43
        s42()
    if trackno==haltno:
        return
    else:
        trackno=44
        s43()
    if trackno==haltno:
        return
    else:
        trackno=45
        s44()
    if trackno==haltno:
        return
    else:
        trackno=46
        s45()
    if trackno==haltno:
        return
    else:
        trackno=47
        s46()
    if trackno==haltno:
        return
    else:
        trackno=48
        s47()
    if trackno==haltno:
        return
    else:
        trackno=49
        s48()
    if trackno==haltno:
        return
    else:
        trackno=50
        s49()
    if trackno==haltno:
        return
    else:
        trackno=51
        s50()
    if trackno==haltno:
        return
    else:
        trackno=52
        s51()
    if trackno==haltno:
        return
    else:
        trackno=53
        s52()
    if trackno==haltno:
        return
    else:
        trackno=54
        s53()
    if trackno==haltno:
        return
    else:
        trackno=55
        s54()
    if trackno==haltno:
        return
    else:
        trackno=56
        s55()
    if trackno==haltno:
        return
    else:
        trackno=57
        s56()
    if trackno==haltno:
        return
    else:
        trackno=58
        s57()
    if trackno==haltno:
        return
    else:
        trackno=59
        s58()
    if trackno==haltno:
        return
    else:
        trackno=60
        s59()
    if trackno==haltno:
        return
    else:
        trackno=61
        s60()
    if trackno==haltno:
        return
    else:
        trackno=62
        s61()
    if trackno==haltno:
        return
    else:
        trackno=63
        s62()
    if trackno==haltno:
        return
    else:
        trackno=64
        s63()
    if trackno==haltno:
        return
    else:
        trackno=65
        s64()
    if trackno==haltno:
        return
    else:
        trackno=66
        s65()
    if trackno==haltno:
        return
    else:
        trackno=67
        s66()
    if trackno==haltno:
        return
    else:
        trackno=68
        s67()
    if trackno==haltno:
        return
    else:
        trackno=69
        s68()
    if trackno==haltno:
        return
    else:
        trackno=70
        s69()    
    if trackno==haltno:
        return
    else:
        trackno=71
        s70()
    if trackno==haltno:
        return
    else:
        trackno=72
        s71()
    if trackno==haltno:
        return
    else:
        trackno=73
        s72()
    if trackno==haltno:
        return
    else:
        trackno=74
        s73()
    if trackno==haltno:
        return
    else:
        trackno=75
        s74()
    if trackno==haltno:
        return
    else:
        trackno=76
        s75()
    if trackno==haltno:
        return
    else:
        trackno=77
        s76()
    if trackno==haltno:
        return
    else:
        trackno=78
        s77()
    if trackno==haltno:
        return
    else:
        trackno=79
        s78()
    if trackno==haltno:
        return
    else:
        trackno=80
        s79()
    if trackno==haltno:
        return
    else:
        trackno=81
        s80()
    if trackno==haltno:
        return
    else:
        trackno=82
        s81()
    if trackno==haltno:
        return
    else:
        trackno=83
        s82()
    if trackno==haltno:
        return
    else:
        trackno=84
        s83()
    if trackno==haltno:
        return
    else:
        trackno=85
        s84()
    if trackno==haltno:
        return
    else:
        trackno=86
        s85()
    if trackno==haltno:
        return
    else:
        trackno=86
        s86()
    if trackno==haltno:
        return
    else:
        trackno=87
        s87()
    if trackno==haltno:
        return
    else:
        trackno=88
        s88()
    if trackno==haltno:
        return
    else:
        trackno=89
        s89()
    if trackno==haltno:
        return
    else:
        trackno=90
        s90()
    if trackno==haltno:
        return
    else:
        trackno=92
        s91()
    if trackno==haltno:
        return
    else:
        trackno=93
        s92()
    if trackno==haltno:
        return
    else:
        trackno=94
        s93()
    if trackno==haltno:
        return
    else:
        trackno=95
        s94()
    if trackno==haltno:
        return
    else:
        trackno=96
        s95()
    if trackno==haltno:
        return
    else:
        trackno=97
        s96()
    if trackno==haltno:
        return
    else:
        trackno=98
        s97()
    if trackno==haltno:
        return
    else:
        trackno=99
        s98()
    if trackno==haltno:
        return
    else:
        trackno=100
        s99()
    
def reset():
 
    global b0_17var, speed0, speed1, speed2, speed3, speed4, speed5, speed6, speed7, speed8, speed9, speed10, speed11, speed12, speed13, speed14, speed15, speed16, \
           speed17, speed18, speed19, speed20, speed21, speed22, speed23, speed24, speed25, speed26, speed27, speed28, speed29, speed30, speed31, speed32, speed33, \
           speed34, speed35, speed36, speed37, speed38, speed39, speed40, speed41, speed42, speed43, speed44, speed45, speed46, speed47, speed48, speed49, speed50, \
           speed51, speed52, speed53, speed54, speed55, speed56, speed57, speed58, speed59, speed60, speed61, speed62, speed63, speed64, speed65, speed66, speed67, \
           speed68, speed69, speed70, speed71, speed72, speed73, speed74, speed75, speed76, speed77, speed78, speed79, speed80, speed81, speed82, speed83, speed84, \
           speed85, speed86, speed87, speed88, speed89, speed90, speed91, speed92, speed93, speed94, speed95, speed96, speed97, speed98, speed99, repeat, loop
    
    if b0_0var.get()>0:
        b0_0.invoke()
    if b0_1var.get()>0:
        b0_1.invoke()
    if b0_2var.get()>0:
        b0_2.invoke()
    if b0_3var.get()>0:
        b0_3.invoke()
    if b0_4var.get()>0:
        b0_4.invoke()
    if b0_5var.get()>0:
        b0_5.invoke()
    if b0_6var.get()>0:
        b0_6.invoke()
    if b0_7var.get()>0:
        b0_7.invoke()
    if b0_8var.get()>0:
        b0_8.invoke()
    if b0_9var.get()>0:
        b0_9.invoke()
    if b0_10var.get()>0:
        b0_10.invoke()
    if b0_11var.get()>0:
        b0_11.invoke()
    if b0_12var.get()>0:
        b0_12.invoke()
    if b0_13var.get()>0:
        b0_13.invoke()
    if b0_14var.get()>0:
        b0_14.invoke()
    if b0_15var.get()>0:
        b0_15.invoke()        
    if b0_16var.get()>0:
        b0_16.invoke()
    if b0_17var.get()>0:
        b0_17.invoke()
    if trig_1var.get()>0:
        trig_1.invoke()        

    if b1_0var.get()>0:
        b1_0.invoke()
    if b1_1var.get()>0:
        b1_1.invoke()
    if b1_2var.get()>0:
        b1_2.invoke()
    if b1_3var.get()>0:
        b1_3.invoke()
    if b1_4var.get()>0:
        b1_4.invoke()
    if b1_5var.get()>0:
        b1_5.invoke()
    if b1_6var.get()>0:
        b1_6.invoke()
    if b1_7var.get()>0:
        b1_7.invoke()
    if b1_8var.get()>0:
        b1_8.invoke()
    if b1_9var.get()>0:
        b1_9.invoke()
    if b1_10var.get()>0:
        b1_10.invoke()
    if b1_11var.get()>0:
        b1_11.invoke()
    if b1_12var.get()>0:
        b1_12.invoke()
    if b1_13var.get()>0:
        b1_13.invoke()
    if b1_14var.get()>0:
        b1_14.invoke()
    if b1_15var.get()>0:
        b1_15.invoke() 
    if b1_17var.get()>0:
        b1_17.invoke()
    if trig_2var.get()>0:
        trig_2.invoke()
        
    if b2_0var.get()>0:
        b2_0.invoke()
    if b2_1var.get()>0:
        b2_1.invoke()
    if b2_2var.get()>0:
        b2_2.invoke()
    if b2_3var.get()>0:
        b2_3.invoke()
    if b2_4var.get()>0:
        b2_4.invoke()
    if b2_5var.get()>0:
        b2_5.invoke()
    if b2_6var.get()>0:
        b2_6.invoke()
    if b2_7var.get()>0:
        b2_7.invoke()
    if b2_8var.get()>0:
        b2_8.invoke()
    if b2_9var.get()>0:
        b2_9.invoke()
    if b2_10var.get()>0:
        b2_10.invoke()
    if b2_11var.get()>0:
        b2_11.invoke()
    if b2_12var.get()>0:
        b2_12.invoke()
    if b2_13var.get()>0:
        b2_13.invoke()
    if b2_14var.get()>0:
        b2_14.invoke()
    if b2_15var.get()>0:
        b2_15.invoke() 
    if b2_17var.get()>0:
        b2_17.invoke()
    if trig_3var.get()>0:
        trig_3.invoke()
        
    if b3_0var.get()>0:
        b3_0.invoke()
    if b3_1var.get()>0:
        b3_1.invoke()
    if b3_2var.get()>0:
        b3_2.invoke()
    if b3_3var.get()>0:
        b3_3.invoke()
    if b3_4var.get()>0:
        b3_4.invoke()
    if b3_5var.get()>0:
        b3_5.invoke()
    if b3_6var.get()>0:
        b3_6.invoke()
    if b3_7var.get()>0:
        b3_7.invoke()
    if b3_8var.get()>0:
        b3_8.invoke()
    if b3_9var.get()>0:
        b3_9.invoke()
    if b3_10var.get()>0:
        b3_10.invoke()
    if b3_11var.get()>0:
        b3_11.invoke()
    if b3_12var.get()>0:
        b3_12.invoke()
    if b3_13var.get()>0:
        b3_13.invoke()
    if b3_14var.get()>0:
        b3_14.invoke()
    if b3_15var.get()>0:
        b3_15.invoke() 
    if b3_17var.get()>0:
        b3_17.invoke()
    if trig_4var.get()>0:
        trig_4.invoke()
        
    if b4_0var.get()>0:
        b4_0.invoke()
    if b4_1var.get()>0:
        b4_1.invoke()
    if b4_2var.get()>0:
        b4_2.invoke()
    if b4_3var.get()>0:
        b4_3.invoke()
    if b4_4var.get()>0:
        b4_4.invoke()
    if b4_5var.get()>0:
        b4_5.invoke()
    if b4_6var.get()>0:
        b4_6.invoke()
    if b4_7var.get()>0:
        b4_7.invoke()
    if b4_8var.get()>0:
        b4_8.invoke()
    if b4_9var.get()>0:
        b4_9.invoke()
    if b4_10var.get()>0:
        b4_10.invoke()
    if b4_11var.get()>0:
        b4_11.invoke()
    if b4_12var.get()>0:
        b4_12.invoke()
    if b4_13var.get()>0:
        b4_13.invoke()
    if b4_14var.get()>0:
        b4_14.invoke()
    if b4_15var.get()>0:
        b4_15.invoke() 
    if b4_17var.get()>0:
        b4_17.invoke()
    if trig_5var.get()>0:
        trig_5.invoke()
        
    if b5_0var.get()>0:
        b5_0.invoke()
    if b5_1var.get()>0:
        b5_1.invoke()
    if b5_2var.get()>0:
        b5_2.invoke()
    if b5_3var.get()>0:
        b5_3.invoke()
    if b5_4var.get()>0:
        b5_4.invoke()
    if b5_5var.get()>0:
        b5_5.invoke()
    if b5_6var.get()>0:
        b5_6.invoke()
    if b5_7var.get()>0:
        b5_7.invoke()
    if b5_8var.get()>0:
        b5_8.invoke()
    if b5_9var.get()>0:
        b5_9.invoke()
    if b5_10var.get()>0:
        b5_10.invoke()
    if b5_11var.get()>0:
        b5_11.invoke()
    if b5_12var.get()>0:
        b5_12.invoke()
    if b5_13var.get()>0:
        b5_13.invoke()
    if b5_14var.get()>0:
        b5_14.invoke()
    if b5_15var.get()>0:
        b5_15.invoke() 
    if b5_17var.get()>0:
        b5_17.invoke()
    if trig_6var.get()>0:
        trig_6.invoke()
        
    if b6_0var.get()>0:
        b6_0.invoke()
    if b6_1var.get()>0:
        b6_1.invoke()
    if b6_2var.get()>0:
        b6_2.invoke()
    if b6_3var.get()>0:
        b6_3.invoke()
    if b6_4var.get()>0:
        b6_4.invoke()
    if b6_5var.get()>0:
        b6_5.invoke()
    if b6_6var.get()>0:
        b6_6.invoke()
    if b6_7var.get()>0:
        b6_7.invoke()
    if b6_8var.get()>0:
        b6_8.invoke()
    if b6_9var.get()>0:
        b6_9.invoke()
    if b6_10var.get()>0:
        b6_10.invoke()
    if b6_11var.get()>0:
        b6_11.invoke()
    if b6_12var.get()>0:
        b6_12.invoke()
    if b6_13var.get()>0:
        b6_13.invoke()
    if b6_14var.get()>0:
        b6_14.invoke()
    if b6_15var.get()>0:
        b6_15.invoke() 
    if b6_17var.get()>0:
        b6_17.invoke()
    if trig_7var.get()>0:
        trig_7.invoke()
        
    if b7_0var.get()>0:
        b7_0.invoke()
    if b7_1var.get()>0:
        b7_1.invoke()
    if b7_2var.get()>0:
        b7_2.invoke()
    if b7_3var.get()>0:
        b7_3.invoke()
    if b7_4var.get()>0:
        b7_4.invoke()
    if b7_5var.get()>0:
        b7_5.invoke()
    if b7_6var.get()>0:
        b7_6.invoke()
    if b7_7var.get()>0:
        b7_7.invoke()
    if b7_8var.get()>0:
        b7_8.invoke()
    if b7_9var.get()>0:
        b7_9.invoke()
    if b7_10var.get()>0:
        b7_10.invoke()
    if b7_11var.get()>0:
        b7_11.invoke()
    if b7_12var.get()>0:
        b7_12.invoke()
    if b7_13var.get()>0:
        b7_13.invoke()
    if b7_14var.get()>0:
        b7_14.invoke()
    if b7_15var.get()>0:
        b7_15.invoke() 
    if b7_17var.get()>0:
        b7_17.invoke()
    if trig_8var.get()>0:
        trig_8.invoke()
        
    if b8_0var.get()>0:
        b8_0.invoke()
    if b8_1var.get()>0:
        b8_1.invoke()
    if b8_2var.get()>0:
        b8_2.invoke()
    if b8_3var.get()>0:
        b8_3.invoke()
    if b8_4var.get()>0:
        b8_4.invoke()
    if b8_5var.get()>0:
        b8_5.invoke()
    if b8_6var.get()>0:
        b8_6.invoke()
    if b8_7var.get()>0:
        b8_7.invoke()
    if b8_8var.get()>0:
        b8_8.invoke()
    if b8_9var.get()>0:
        b8_9.invoke()
    if b8_10var.get()>0:
        b8_10.invoke()
    if b8_11var.get()>0:
        b8_11.invoke()
    if b8_12var.get()>0:
        b8_12.invoke()
    if b8_13var.get()>0:
        b8_13.invoke()
    if b8_14var.get()>0:
        b8_14.invoke()
    if b8_15var.get()>0:
        b0_15.invoke() 
    if b8_17var.get()>0:
        b8_17.invoke()
    if trig_9var.get()>0:
        trig_9.invoke()
        
    if b9_0var.get()>0:
        b9_0.invoke()
    if b9_1var.get()>0:
        b9_1.invoke()
    if b9_2var.get()>0:
        b9_2.invoke()
    if b9_3var.get()>0:
        b9_3.invoke()
    if b9_4var.get()>0:
        b9_4.invoke()
    if b9_5var.get()>0:
        b9_5.invoke()
    if b9_6var.get()>0:
        b9_6.invoke()
    if b9_7var.get()>0:
        b9_7.invoke()
    if b9_8var.get()>0:
        b9_8.invoke()
    if b9_9var.get()>0:
        b9_9.invoke()
    if b9_10var.get()>0:
        b9_10.invoke()
    if b9_11var.get()>0:
        b9_11.invoke()
    if b9_12var.get()>0:
        b9_12.invoke()
    if b9_13var.get()>0:
        b9_13.invoke()
    if b9_14var.get()>0:
        b9_14.invoke()
    if b9_15var.get()>0:
        b9_15.invoke() 
    if b9_17var.get()>0:
        b9_17.invoke()
    if trig_10var.get()>0:
        trig_10.invoke()
        
    if b10_0var.get()>0:
        b10_0.invoke()
    if b10_1var.get()>0:
        b10_1.invoke()
    if b10_2var.get()>0:
        b10_2.invoke()
    if b10_3var.get()>0:
        b10_3.invoke()
    if b10_4var.get()>0:
        b10_4.invoke()
    if b10_5var.get()>0:
        b10_5.invoke()
    if b10_6var.get()>0:
        b10_6.invoke()
    if b10_7var.get()>0:
        b10_7.invoke()
    if b10_8var.get()>0:
        b10_8.invoke()
    if b10_9var.get()>0:
        b10_9.invoke()
    if b10_10var.get()>0:
        b10_10.invoke()
    if b10_11var.get()>0:
        b10_11.invoke()
    if b10_12var.get()>0:
        b10_12.invoke()
    if b10_13var.get()>0:
        b10_13.invoke()
    if b10_14var.get()>0:
        b10_14.invoke()
    if b10_15var.get()>0:
        b10_15.invoke() 
    if b10_17var.get()>0:
        b10_17.invoke()
    if trig_11var.get()>0:
        trig_11.invoke()
        
    if b11_0var.get()>0:
        b11_0.invoke()
    if b11_1var.get()>0:
        b11_1.invoke()
    if b11_2var.get()>0:
        b11_2.invoke()
    if b11_3var.get()>0:
        b11_3.invoke()
    if b11_4var.get()>0:
        b11_4.invoke()
    if b11_5var.get()>0:
        b11_5.invoke()
    if b11_6var.get()>0:
        b11_6.invoke()
    if b11_7var.get()>0:
        b11_7.invoke()
    if b11_8var.get()>0:
        b11_8.invoke()
    if b11_9var.get()>0:
        b11_9.invoke()
    if b11_10var.get()>0:
        b11_10.invoke()
    if b11_11var.get()>0:
        b11_11.invoke()
    if b11_12var.get()>0:
        b11_12.invoke()
    if b11_13var.get()>0:
        b11_13.invoke()
    if b11_14var.get()>0:
        b11_14.invoke()
    if b11_15var.get()>0:
        b11_15.invoke() 
    if b11_17var.get()>0:
        b11_17.invoke()
    if trig_12var.get()>0:
        trig_12.invoke()
        
    if b12_0var.get()>0:
        b12_0.invoke()
    if b12_1var.get()>0:
        b12_1.invoke()
    if b12_2var.get()>0:
        b12_2.invoke()
    if b12_3var.get()>0:
        b12_3.invoke()
    if b12_4var.get()>0:
        b12_4.invoke()
    if b12_5var.get()>0:
        b12_5.invoke()
    if b12_6var.get()>0:
        b12_6.invoke()
    if b12_7var.get()>0:
        b12_7.invoke()
    if b12_8var.get()>0:
        b12_8.invoke()
    if b12_9var.get()>0:
        b12_9.invoke()
    if b12_10var.get()>0:
        b12_10.invoke()
    if b12_11var.get()>0:
        b12_11.invoke()
    if b12_12var.get()>0:
        b12_12.invoke()
    if b12_13var.get()>0:
        b12_13.invoke()
    if b12_14var.get()>0:
        b12_14.invoke()
    if b12_15var.get()>0:
        b12_15.invoke() 
    if b12_17var.get()>0:
        b12_17.invoke()
    if trig_13var.get()>0:
        trig_13.invoke()
        
    if b13_0var.get()>0:
        b13_0.invoke()
    if b13_1var.get()>0:
        b13_1.invoke()
    if b13_2var.get()>0:
        b13_2.invoke()
    if b13_3var.get()>0:
        b13_3.invoke()
    if b13_4var.get()>0:
        b13_4.invoke()
    if b13_5var.get()>0:
        b13_5.invoke()
    if b13_6var.get()>0:
        b13_6.invoke()
    if b13_7var.get()>0:
        b13_7.invoke()
    if b13_8var.get()>0:
        b13_8.invoke()
    if b13_9var.get()>0:
        b13_9.invoke()
    if b13_10var.get()>0:
        b13_10.invoke()
    if b13_11var.get()>0:
        b13_11.invoke()
    if b13_12var.get()>0:
        b13_12.invoke()
    if b13_13var.get()>0:
        b13_13.invoke()
    if b13_14var.get()>0:
        b13_14.invoke()
    if b13_15var.get()>0:
        b13_15.invoke() 
    if b13_17var.get()>0:
        b13_17.invoke()
    if trig_14var.get()>0:
        trig_14.invoke()
        
    if b14_0var.get()>0:
        b14_0.invoke()
    if b14_1var.get()>0:
        b14_1.invoke()
    if b14_2var.get()>0:
        b14_2.invoke()
    if b14_3var.get()>0:
        b14_3.invoke()
    if b14_4var.get()>0:
        b14_4.invoke()
    if b14_5var.get()>0:
        b14_5.invoke()
    if b14_6var.get()>0:
        b14_6.invoke()
    if b14_7var.get()>0:
        b14_7.invoke()
    if b14_8var.get()>0:
        b14_8.invoke()
    if b14_9var.get()>0:
        b14_9.invoke()
    if b14_10var.get()>0:
        b14_10.invoke()
    if b14_11var.get()>0:
        b14_11.invoke()
    if b14_12var.get()>0:
        b14_12.invoke()
    if b14_13var.get()>0:
        b14_13.invoke()
    if b14_14var.get()>0:
        b14_14.invoke()
    if b14_15var.get()>0:
        b14_15.invoke() 
    if b14_17var.get()>0:
        b14_17.invoke()
    if trig_15var.get()>0:
        trig_15.invoke()
        
    if b15_0var.get()>0:
        b15_0.invoke()
    if b15_1var.get()>0:
        b15_1.invoke()
    if b15_2var.get()>0:
        b15_2.invoke()
    if b15_3var.get()>0:
        b15_3.invoke()
    if b15_4var.get()>0:
        b15_4.invoke()
    if b15_5var.get()>0:
        b15_5.invoke()
    if b15_6var.get()>0:
        b15_6.invoke()
    if b15_7var.get()>0:
        b15_7.invoke()
    if b15_8var.get()>0:
        b15_8.invoke()
    if b15_9var.get()>0:
        b15_9.invoke()
    if b15_10var.get()>0:
        b15_10.invoke()
    if b15_11var.get()>0:
        b15_11.invoke()
    if b15_12var.get()>0:
        b15_12.invoke()
    if b15_13var.get()>0:
        b15_13.invoke()
    if b15_14var.get()>0:
        b15_14.invoke()
    if b15_15var.get()>0:
        b15_15.invoke() 
    if b15_17var.get()>0:
        b15_17.invoke()
    if trig_16var.get()>0:
        trig_16.invoke()
        
    if b16_0var.get()>0:
        b16_0.invoke()
    if b16_1var.get()>0:
        b16_1.invoke()
    if b16_2var.get()>0:
        b16_2.invoke()
    if b16_3var.get()>0:
        b16_3.invoke()
    if b16_4var.get()>0:
        b16_4.invoke()
    if b16_5var.get()>0:
        b16_5.invoke()
    if b16_6var.get()>0:
        b16_6.invoke()
    if b16_7var.get()>0:
        b16_7.invoke()
    if b16_8var.get()>0:
        b16_8.invoke()
    if b16_9var.get()>0:
        b16_9.invoke()
    if b16_10var.get()>0:
        b16_10.invoke()
    if b16_11var.get()>0:
        b16_11.invoke()
    if b16_12var.get()>0:
        b16_12.invoke()
    if b16_13var.get()>0:
        b16_13.invoke()
    if b16_14var.get()>0:
        b16_14.invoke()
    if b16_15var.get()>0:
        b16_15.invoke() 
    if b16_17var.get()>0:
        b16_17.invoke()
    if trig_17var.get()>0:
        trig_17.invoke()
        
    if b17_0var.get()>0:
        b17_0.invoke()
    if b17_1var.get()>0:
        b17_1.invoke()
    if b17_2var.get()>0:
        b17_2.invoke()
    if b17_3var.get()>0:
        b17_3.invoke()
    if b17_4var.get()>0:
        b17_4.invoke()
    if b17_5var.get()>0:
        b17_5.invoke()
    if b17_6var.get()>0:
        b17_6.invoke()
    if b17_7var.get()>0:
        b17_7.invoke()
    if b17_8var.get()>0:
        b17_8.invoke()
    if b17_9var.get()>0:
        b17_9.invoke()
    if b17_10var.get()>0:
        b17_10.invoke()
    if b17_11var.get()>0:
        b17_11.invoke()
    if b17_12var.get()>0:
        b17_12.invoke()
    if b17_13var.get()>0:
        b17_13.invoke()
    if b17_14var.get()>0:
        b17_14.invoke()
    if b17_15var.get()>0:
        b17_15.invoke() 
    if b17_17var.get()>0:
        b17_17.invoke()
    if trig_18var.get()>0:
        trig_18.invoke()
        
    if b18_0var.get()>0:
        b18_0.invoke()
    if b18_1var.get()>0:
        b18_1.invoke()
    if b18_2var.get()>0:
        b18_2.invoke()
    if b18_3var.get()>0:
        b18_3.invoke()
    if b18_4var.get()>0:
        b18_4.invoke()
    if b18_5var.get()>0:
        b18_5.invoke()
    if b18_6var.get()>0:
        b18_6.invoke()
    if b18_7var.get()>0:
        b18_7.invoke()
    if b18_8var.get()>0:
        b18_8.invoke()
    if b18_9var.get()>0:
        b18_9.invoke()
    if b18_10var.get()>0:
        b18_10.invoke()
    if b18_11var.get()>0:
        b18_11.invoke()
    if b18_12var.get()>0:
        b18_12.invoke()
    if b18_13var.get()>0:
        b18_13.invoke()
    if b18_14var.get()>0:
        b18_14.invoke()
    if b18_15var.get()>0:
        b18_15.invoke() 
    if b18_17var.get()>0:
        b18_17.invoke()
    if trig_19var.get()>0:
        trig_19.invoke()
        
    if b19_0var.get()>0:
        b19_0.invoke()
    if b19_1var.get()>0:
        b19_1.invoke()
    if b19_2var.get()>0:
        b19_2.invoke()
    if b19_3var.get()>0:
        b19_3.invoke()
    if b19_4var.get()>0:
        b19_4.invoke()
    if b19_5var.get()>0:
        b19_5.invoke()
    if b19_6var.get()>0:
        b19_6.invoke()
    if b19_7var.get()>0:
        b19_7.invoke()
    if b19_8var.get()>0:
        b19_8.invoke()
    if b19_9var.get()>0:
        b19_9.invoke()
    if b19_10var.get()>0:
        b19_10.invoke()
    if b19_11var.get()>0:
        b19_11.invoke()
    if b19_12var.get()>0:
        b19_12.invoke()
    if b19_13var.get()>0:
        b19_13.invoke()
    if b19_14var.get()>0:
        b19_14.invoke()
    if b19_15var.get()>0:
        b19_15.invoke() 
    if b19_17var.get()>0:
        b19_17.invoke()
    if trig_20var.get()>0:
        trig_20.invoke()
        
    if b20_0var.get()>0:
        b20_0.invoke()
    if b20_1var.get()>0:
        b20_1.invoke()
    if b20_2var.get()>0:
        b20_2.invoke()
    if b20_3var.get()>0:
        b20_3.invoke()
    if b20_4var.get()>0:
        b20_4.invoke()
    if b20_5var.get()>0:
        b20_5.invoke()
    if b20_6var.get()>0:
        b20_6.invoke()
    if b20_7var.get()>0:
        b20_7.invoke()
    if b20_8var.get()>0:
        b20_8.invoke()
    if b20_9var.get()>0:
        b20_9.invoke()
    if b20_10var.get()>0:
        b20_10.invoke()
    if b20_11var.get()>0:
        b20_11.invoke()
    if b20_12var.get()>0:
        b20_12.invoke()
    if b20_13var.get()>0:
        b20_13.invoke()
    if b20_14var.get()>0:
        b20_14.invoke()
    if b20_15var.get()>0:
        b20_15.invoke() 
    if b20_17var.get()>0:
        b20_17.invoke()
    if trig_21var.get()>0:
        trig_21.invoke()
        
    if b21_0var.get()>0:
        b21_0.invoke()
    if b21_1var.get()>0:
        b21_1.invoke()
    if b21_2var.get()>0:
        b21_2.invoke()
    if b21_3var.get()>0:
        b21_3.invoke()
    if b21_4var.get()>0:
        b21_4.invoke()
    if b21_5var.get()>0:
        b21_5.invoke()
    if b21_6var.get()>0:
        b21_6.invoke()
    if b21_7var.get()>0:
        b21_7.invoke()
    if b21_8var.get()>0:
        b21_8.invoke()
    if b21_9var.get()>0:
        b21_9.invoke()
    if b21_10var.get()>0:
        b21_10.invoke()
    if b21_11var.get()>0:
        b21_11.invoke()
    if b21_12var.get()>0:
        b21_12.invoke()
    if b21_13var.get()>0:
        b21_13.invoke()
    if b21_14var.get()>0:
        b21_14.invoke()
    if b21_15var.get()>0:
        b21_15.invoke() 
    if b21_17var.get()>0:
        b21_17.invoke()
    if trig_22var.get()>0:
        trig_22.invoke()
        
    if b22_0var.get()>0:
        b22_0.invoke()
    if b22_1var.get()>0:
        b22_1.invoke()
    if b22_2var.get()>0:
        b22_2.invoke()
    if b22_3var.get()>0:
        b22_3.invoke()
    if b22_4var.get()>0:
        b22_4.invoke()
    if b22_5var.get()>0:
        b22_5.invoke()
    if b22_6var.get()>0:
        b22_6.invoke()
    if b22_7var.get()>0:
        b22_7.invoke()
    if b22_8var.get()>0:
        b22_8.invoke()
    if b22_9var.get()>0:
        b22_9.invoke()
    if b22_10var.get()>0:
        b22_10.invoke()
    if b22_11var.get()>0:
        b22_11.invoke()
    if b22_12var.get()>0:
        b22_12.invoke()
    if b22_13var.get()>0:
        b22_13.invoke()
    if b22_14var.get()>0:
        b22_14.invoke()
    if b22_15var.get()>0:
        b22_15.invoke() 
    if b22_17var.get()>0:
        b22_17.invoke()
    if trig_23var.get()>0:
        trig_23.invoke()
        
    if b23_0var.get()>0:
        b23_0.invoke()
    if b23_1var.get()>0:
        b23_1.invoke()
    if b23_2var.get()>0:
        b23_2.invoke()
    if b23_3var.get()>0:
        b23_3.invoke()
    if b23_4var.get()>0:
        b23_4.invoke()
    if b23_5var.get()>0:
        b23_5.invoke()
    if b23_6var.get()>0:
        b23_6.invoke()
    if b23_7var.get()>0:
        b23_7.invoke()
    if b23_8var.get()>0:
        b23_8.invoke()
    if b23_9var.get()>0:
        b23_9.invoke()
    if b23_10var.get()>0:
        b23_10.invoke()
    if b23_11var.get()>0:
        b23_11.invoke()
    if b23_12var.get()>0:
        b23_12.invoke()
    if b23_13var.get()>0:
        b23_13.invoke()
    if b23_14var.get()>0:
        b23_14.invoke()
    if b23_15var.get()>0:
        b23_15.invoke() 
    if b23_17var.get()>0:
        b23_17.invoke()
    if trig_24var.get()>0:
        trig_24.invoke()
        
    if b24_0var.get()>0:
        b24_0.invoke()
    if b24_1var.get()>0:
        b24_1.invoke()
    if b24_2var.get()>0:
        b24_2.invoke()
    if b24_3var.get()>0:
        b24_3.invoke()
    if b24_4var.get()>0:
        b24_4.invoke()
    if b24_5var.get()>0:
        b24_5.invoke()
    if b24_6var.get()>0:
        b24_6.invoke()
    if b24_7var.get()>0:
        b24_7.invoke()
    if b24_8var.get()>0:
        b24_8.invoke()
    if b24_9var.get()>0:
        b24_9.invoke()
    if b24_10var.get()>0:
        b24_10.invoke()
    if b24_11var.get()>0:
        b24_11.invoke()
    if b24_12var.get()>0:
        b24_12.invoke()
    if b24_13var.get()>0:
        b24_13.invoke()
    if b24_14var.get()>0:
        b24_14.invoke()
    if b24_15var.get()>0:
        b24_15.invoke() 
    if b24_17var.get()>0:
        b24_17.invoke()
    if trig_25var.get()>0:
        trig_25.invoke()
        
    if b25_0var.get()>0:
        b25_0.invoke()
    if b25_1var.get()>0:
        b25_1.invoke()
    if b25_2var.get()>0:
        b25_2.invoke()
    if b25_3var.get()>0:
        b25_3.invoke()
    if b25_4var.get()>0:
        b25_4.invoke()
    if b25_5var.get()>0:
        b25_5.invoke()
    if b25_6var.get()>0:
        b25_6.invoke()
    if b25_7var.get()>0:
        b25_7.invoke()
    if b25_8var.get()>0:
        b25_8.invoke()
    if b25_9var.get()>0:
        b25_9.invoke()
    if b25_10var.get()>0:
        b25_10.invoke()
    if b25_11var.get()>0:
        b25_11.invoke()
    if b25_12var.get()>0:
        b25_12.invoke()
    if b25_13var.get()>0:
        b25_13.invoke()
    if b25_14var.get()>0:
        b25_14.invoke()
    if b25_15var.get()>0:
        b25_15.invoke() 
    if b25_17var.get()>0:
        b25_17.invoke()
    if trig_26var.get()>0:
        trig_26.invoke()
        
    if b26_0var.get()>0:
        b26_0.invoke()
    if b26_1var.get()>0:
        b26_1.invoke()
    if b26_2var.get()>0:
        b26_2.invoke()
    if b26_3var.get()>0:
        b26_3.invoke()
    if b26_4var.get()>0:
        b26_4.invoke()
    if b26_5var.get()>0:
        b26_5.invoke()
    if b26_6var.get()>0:
        b26_6.invoke()
    if b26_7var.get()>0:
        b26_7.invoke()
    if b26_8var.get()>0:
        b26_8.invoke()
    if b26_9var.get()>0:
        b26_9.invoke()
    if b26_10var.get()>0:
        b26_10.invoke()
    if b26_11var.get()>0:
        b26_11.invoke()
    if b26_12var.get()>0:
        b26_12.invoke()
    if b26_13var.get()>0:
        b26_13.invoke()
    if b26_14var.get()>0:
        b26_14.invoke()
    if b26_15var.get()>0:
        b26_15.invoke() 
    if b26_17var.get()>0:
        b26_17.invoke()
    if trig_27var.get()>0:
        trig_27.invoke()
        
    if b27_0var.get()>0:
        b27_0.invoke()
    if b27_1var.get()>0:
        b27_1.invoke()
    if b27_2var.get()>0:
        b27_2.invoke()
    if b27_3var.get()>0:
        b27_3.invoke()
    if b27_4var.get()>0:
        b27_4.invoke()
    if b27_5var.get()>0:
        b27_5.invoke()
    if b27_6var.get()>0:
        b27_6.invoke()
    if b27_7var.get()>0:
        b27_7.invoke()
    if b27_8var.get()>0:
        b27_8.invoke()
    if b27_9var.get()>0:
        b27_9.invoke()
    if b27_10var.get()>0:
        b27_10.invoke()
    if b27_11var.get()>0:
        b27_11.invoke()
    if b27_12var.get()>0:
        b27_12.invoke()
    if b27_13var.get()>0:
        b27_13.invoke()
    if b27_14var.get()>0:
        b27_14.invoke()
    if b27_15var.get()>0:
        b27_15.invoke() 
    if b27_17var.get()>0:
        b27_17.invoke()
    if trig_28var.get()>0:
        trig_28.invoke()
        
    if b28_0var.get()>0:
        b28_0.invoke()
    if b28_1var.get()>0:
        b28_1.invoke()
    if b28_2var.get()>0:
        b28_2.invoke()
    if b28_3var.get()>0:
        b28_3.invoke()
    if b28_4var.get()>0:
        b28_4.invoke()
    if b28_5var.get()>0:
        b28_5.invoke()
    if b28_6var.get()>0:
        b28_6.invoke()
    if b28_7var.get()>0:
        b28_7.invoke()
    if b28_8var.get()>0:
        b28_8.invoke()
    if b28_9var.get()>0:
        b28_9.invoke()
    if b28_10var.get()>0:
        b28_10.invoke()
    if b28_11var.get()>0:
        b28_11.invoke()
    if b28_12var.get()>0:
        b28_12.invoke()
    if b28_13var.get()>0:
        b28_13.invoke()
    if b28_14var.get()>0:
        b28_14.invoke()
    if b28_15var.get()>0:
        b28_15.invoke() 
    if b28_17var.get()>0:
        b28_17.invoke()
    if trig_29var.get()>0:
        trig_29.invoke()
        
    if b29_0var.get()>0:
        b29_0.invoke()
    if b29_1var.get()>0:
        b29_1.invoke()
    if b29_2var.get()>0:
        b29_2.invoke()
    if b29_3var.get()>0:
        b29_3.invoke()
    if b29_4var.get()>0:
        b29_4.invoke()
    if b29_5var.get()>0:
        b29_5.invoke()
    if b29_6var.get()>0:
        b29_6.invoke()
    if b29_7var.get()>0:
        b29_7.invoke()
    if b29_8var.get()>0:
        b29_8.invoke()
    if b29_9var.get()>0:
        b29_9.invoke()
    if b29_10var.get()>0:
        b29_10.invoke()
    if b29_11var.get()>0:
        b29_11.invoke()
    if b29_12var.get()>0:
        b29_12.invoke()
    if b29_13var.get()>0:
        b29_13.invoke()
    if b29_14var.get()>0:
        b29_14.invoke()
    if b29_15var.get()>0:
        b29_15.invoke() 
    if b29_17var.get()>0:
        b29_17.invoke()
    if trig_30var.get()>0:
        trig_30.invoke()
        
    if b30_0var.get()>0:
        b30_0.invoke()
    if b30_1var.get()>0:
        b30_1.invoke()
    if b30_2var.get()>0:
        b30_2.invoke()
    if b30_3var.get()>0:
        b30_3.invoke()
    if b30_4var.get()>0:
        b30_4.invoke()
    if b30_5var.get()>0:
        b30_5.invoke()
    if b30_6var.get()>0:
        b30_6.invoke()
    if b30_7var.get()>0:
        b30_7.invoke()
    if b30_8var.get()>0:
        b30_8.invoke()
    if b30_9var.get()>0:
        b30_9.invoke()
    if b30_10var.get()>0:
        b30_10.invoke()
    if b30_11var.get()>0:
        b30_11.invoke()
    if b30_12var.get()>0:
        b30_12.invoke()
    if b30_13var.get()>0:
        b30_13.invoke()
    if b30_14var.get()>0:
        b30_14.invoke()
    if b30_15var.get()>0:
        b30_15.invoke() 
    if b30_17var.get()>0:
        b30_17.invoke()
    if trig_31var.get()>0:
        trig_31.invoke()
        
    if b31_0var.get()>0:
        b31_0.invoke()
    if b31_1var.get()>0:
        b31_1.invoke()
    if b31_2var.get()>0:
        b31_2.invoke()
    if b31_3var.get()>0:
        b31_3.invoke()
    if b31_4var.get()>0:
        b31_4.invoke()
    if b31_5var.get()>0:
        b31_5.invoke()
    if b31_6var.get()>0:
        b31_6.invoke()
    if b31_7var.get()>0:
        b31_7.invoke()
    if b31_8var.get()>0:
        b31_8.invoke()
    if b31_9var.get()>0:
        b31_9.invoke()
    if b31_10var.get()>0:
        b31_10.invoke()
    if b31_11var.get()>0:
        b31_11.invoke()
    if b31_12var.get()>0:
        b31_12.invoke()
    if b31_13var.get()>0:
        b31_13.invoke()
    if b31_14var.get()>0:
        b31_14.invoke()
    if b31_15var.get()>0:
        b31_15.invoke() 
    if b31_17var.get()>0:
        b31_17.invoke()
    if trig_32var.get()>0:
        trig_32.invoke()
        
    if b32_0var.get()>0:
        b32_0.invoke()
    if b32_1var.get()>0:
        b32_1.invoke()
    if b32_2var.get()>0:
        b32_2.invoke()
    if b32_3var.get()>0:
        b32_3.invoke()
    if b32_4var.get()>0:
        b32_4.invoke()
    if b32_5var.get()>0:
        b32_5.invoke()
    if b32_6var.get()>0:
        b32_6.invoke()
    if b32_7var.get()>0:
        b32_7.invoke()
    if b32_8var.get()>0:
        b32_8.invoke()
    if b32_9var.get()>0:
        b32_9.invoke()
    if b32_10var.get()>0:
        b32_10.invoke()
    if b32_11var.get()>0:
        b32_11.invoke()
    if b32_12var.get()>0:
        b32_12.invoke()
    if b32_13var.get()>0:
        b32_13.invoke()
    if b32_14var.get()>0:
        b32_14.invoke()
    if b32_15var.get()>0:
        b32_15.invoke() 
    if b32_17var.get()>0:
        b32_17.invoke()
    if trig_33var.get()>0:
        trig_33.invoke()
        
    if b33_0var.get()>0:
        b33_0.invoke()
    if b33_1var.get()>0:
        b33_1.invoke()
    if b33_2var.get()>0:
        b33_2.invoke()
    if b33_3var.get()>0:
        b33_3.invoke()
    if b33_4var.get()>0:
        b33_4.invoke()
    if b33_5var.get()>0:
        b33_5.invoke()
    if b33_6var.get()>0:
        b33_6.invoke()
    if b33_7var.get()>0:
        b33_7.invoke()
    if b33_8var.get()>0:
        b33_8.invoke()
    if b33_9var.get()>0:
        b33_9.invoke()
    if b33_10var.get()>0:
        b33_10.invoke()
    if b33_11var.get()>0:
        b33_11.invoke()
    if b33_12var.get()>0:
        b33_12.invoke()
    if b33_13var.get()>0:
        b33_13.invoke()
    if b33_14var.get()>0:
        b33_14.invoke()
    if b33_15var.get()>0:
        b33_15.invoke() 
    if b33_17var.get()>0:
        b33_17.invoke()
    if trig_34var.get()>0:
        trig_34.invoke()
        
    if b34_0var.get()>0:
        b34_0.invoke()
    if b34_1var.get()>0:
        b34_1.invoke()
    if b34_2var.get()>0:
        b34_2.invoke()
    if b34_3var.get()>0:
        b34_3.invoke()
    if b34_4var.get()>0:
        b34_4.invoke()
    if b34_5var.get()>0:
        b34_5.invoke()
    if b34_6var.get()>0:
        b34_6.invoke()
    if b34_7var.get()>0:
        b34_7.invoke()
    if b34_8var.get()>0:
        b34_8.invoke()
    if b34_9var.get()>0:
        b34_9.invoke()
    if b34_10var.get()>0:
        b34_10.invoke()
    if b34_11var.get()>0:
        b34_11.invoke()
    if b34_12var.get()>0:
        b34_12.invoke()
    if b34_13var.get()>0:
        b34_13.invoke()
    if b34_14var.get()>0:
        b34_14.invoke()
    if b34_15var.get()>0:
        b34_15.invoke() 
    if b34_17var.get()>0:
        b34_17.invoke()
    if trig_35var.get()>0:
        trig_35.invoke()
        
    if b35_0var.get()>0:
        b35_0.invoke()
    if b35_1var.get()>0:
        b35_1.invoke()
    if b35_2var.get()>0:
        b35_2.invoke()
    if b35_3var.get()>0:
        b35_3.invoke()
    if b35_4var.get()>0:
        b35_4.invoke()
    if b35_5var.get()>0:
        b35_5.invoke()
    if b35_6var.get()>0:
        b35_6.invoke()
    if b35_7var.get()>0:
        b35_7.invoke()
    if b35_8var.get()>0:
        b35_8.invoke()
    if b35_9var.get()>0:
        b35_9.invoke()
    if b35_10var.get()>0:
        b35_10.invoke()
    if b35_11var.get()>0:
        b35_11.invoke()
    if b35_12var.get()>0:
        b35_12.invoke()
    if b35_13var.get()>0:
        b35_13.invoke()
    if b35_14var.get()>0:
        b35_14.invoke()
    if b35_15var.get()>0:
        b35_15.invoke() 
    if b35_17var.get()>0:
        b35_17.invoke()
    if trig_36var.get()>0:
        trig_36.invoke()
        
    if b36_0var.get()>0:
        b36_0.invoke()
    if b36_1var.get()>0:
        b36_1.invoke()
    if b36_2var.get()>0:
        b36_2.invoke()
    if b36_3var.get()>0:
        b36_3.invoke()
    if b36_4var.get()>0:
        b36_4.invoke()
    if b36_5var.get()>0:
        b36_5.invoke()
    if b36_6var.get()>0:
        b36_6.invoke()
    if b36_7var.get()>0:
        b36_7.invoke()
    if b36_8var.get()>0:
        b36_8.invoke()
    if b36_9var.get()>0:
        b36_9.invoke()
    if b36_10var.get()>0:
        b36_10.invoke()
    if b36_11var.get()>0:
        b36_11.invoke()
    if b36_12var.get()>0:
        b36_12.invoke()
    if b36_13var.get()>0:
        b36_13.invoke()
    if b36_14var.get()>0:
        b36_14.invoke()
    if b36_15var.get()>0:
        b36_15.invoke() 
    if b36_17var.get()>0:
        b36_17.invoke()
    if trig_37var.get()>0:
        trig_37.invoke()
        
    if b37_0var.get()>0:
        b37_0.invoke()
    if b37_1var.get()>0:
        b37_1.invoke()
    if b37_2var.get()>0:
        b37_2.invoke()
    if b37_3var.get()>0:
        b37_3.invoke()
    if b37_4var.get()>0:
        b37_4.invoke()
    if b37_5var.get()>0:
        b37_5.invoke()
    if b37_6var.get()>0:
        b37_6.invoke()
    if b37_7var.get()>0:
        b37_7.invoke()
    if b37_8var.get()>0:
        b37_8.invoke()
    if b37_9var.get()>0:
        b37_9.invoke()
    if b37_10var.get()>0:
        b37_10.invoke()
    if b37_11var.get()>0:
        b37_11.invoke()
    if b37_12var.get()>0:
        b37_12.invoke()
    if b37_13var.get()>0:
        b37_13.invoke()
    if b37_14var.get()>0:
        b37_14.invoke()
    if b37_15var.get()>0:
        b37_15.invoke() 
    if b37_17var.get()>0:
        b37_17.invoke()
    if trig_38var.get()>0:
        trig_38.invoke()
        
    if b38_0var.get()>0:
        b38_0.invoke()
    if b38_1var.get()>0:
        b38_1.invoke()
    if b38_2var.get()>0:
        b38_2.invoke()
    if b38_3var.get()>0:
        b38_3.invoke()
    if b38_4var.get()>0:
        b38_4.invoke()
    if b38_5var.get()>0:
        b38_5.invoke()
    if b38_6var.get()>0:
        b38_6.invoke()
    if b38_7var.get()>0:
        b38_7.invoke()
    if b38_8var.get()>0:
        b38_8.invoke()
    if b38_9var.get()>0:
        b38_9.invoke()
    if b38_10var.get()>0:
        b38_10.invoke()
    if b38_11var.get()>0:
        b38_11.invoke()
    if b38_12var.get()>0:
        b38_12.invoke()
    if b38_13var.get()>0:
        b38_13.invoke()
    if b38_14var.get()>0:
        b38_14.invoke()
    if b38_15var.get()>0:
        b38_15.invoke() 
    if b38_17var.get()>0:
        b38_17.invoke()
    if trig_39var.get()>0:
        trig_39.invoke()
        
    if b39_0var.get()>0:
        b39_0.invoke()
    if b39_1var.get()>0:
        b39_1.invoke()
    if b39_2var.get()>0:
        b39_2.invoke()
    if b39_3var.get()>0:
        b39_3.invoke()
    if b39_4var.get()>0:
        b39_4.invoke()
    if b39_5var.get()>0:
        b39_5.invoke()
    if b39_6var.get()>0:
        b39_6.invoke()
    if b39_7var.get()>0:
        b39_7.invoke()
    if b39_8var.get()>0:
        b39_8.invoke()
    if b39_9var.get()>0:
        b39_9.invoke()
    if b39_10var.get()>0:
        b39_10.invoke()
    if b39_11var.get()>0:
        b39_11.invoke()
    if b39_12var.get()>0:
        b39_12.invoke()
    if b39_13var.get()>0:
        b39_13.invoke()
    if b39_14var.get()>0:
        b39_14.invoke()
    if b39_15var.get()>0:
        b39_15.invoke() 
    if b39_17var.get()>0:
        b39_17.invoke()
    if trig_40var.get()>0:
        trig_40.invoke()
        
    if b40_0var.get()>0:
        b40_0.invoke()
    if b40_1var.get()>0:
        b40_1.invoke()
    if b40_2var.get()>0:
        b40_2.invoke()
    if b40_3var.get()>0:
        b40_3.invoke()
    if b40_4var.get()>0:
        b40_4.invoke()
    if b40_5var.get()>0:
        b40_5.invoke()
    if b40_6var.get()>0:
        b40_6.invoke()
    if b40_7var.get()>0:
        b40_7.invoke()
    if b40_8var.get()>0:
        b40_8.invoke()
    if b40_9var.get()>0:
        b40_9.invoke()
    if b40_10var.get()>0:
        b40_10.invoke()
    if b40_11var.get()>0:
        b40_11.invoke()
    if b40_12var.get()>0:
        b40_12.invoke()
    if b40_13var.get()>0:
        b40_13.invoke()
    if b40_14var.get()>0:
        b40_14.invoke()
    if b40_15var.get()>0:
        b40_15.invoke() 
    if b40_17var.get()>0:
        b40_17.invoke()
    if trig_41var.get()>0:
        trig_41.invoke()
        
    if b41_0var.get()>0:
        b41_0.invoke()
    if b41_1var.get()>0:
        b41_1.invoke()
    if b41_2var.get()>0:
        b41_2.invoke()
    if b41_3var.get()>0:
        b41_3.invoke()
    if b41_4var.get()>0:
        b41_4.invoke()
    if b41_5var.get()>0:
        b41_5.invoke()
    if b41_6var.get()>0:
        b41_6.invoke()
    if b41_7var.get()>0:
        b41_7.invoke()
    if b41_8var.get()>0:
        b41_8.invoke()
    if b41_9var.get()>0:
        b41_9.invoke()
    if b41_10var.get()>0:
        b41_10.invoke()
    if b41_11var.get()>0:
        b41_11.invoke()
    if b41_12var.get()>0:
        b41_12.invoke()
    if b41_13var.get()>0:
        b41_13.invoke()
    if b41_14var.get()>0:
        b41_14.invoke()
    if b41_15var.get()>0:
        b41_15.invoke() 
    if b41_17var.get()>0:
        b41_17.invoke()
    if trig_42var.get()>0:
        trig_42.invoke()
        
    if b42_0var.get()>0:
        b42_0.invoke()
    if b42_1var.get()>0:
        b42_1.invoke()
    if b42_2var.get()>0:
        b42_2.invoke()
    if b42_3var.get()>0:
        b42_3.invoke()
    if b42_4var.get()>0:
        b42_4.invoke()
    if b42_5var.get()>0:
        b42_5.invoke()
    if b42_6var.get()>0:
        b42_6.invoke()
    if b42_7var.get()>0:
        b42_7.invoke()
    if b42_8var.get()>0:
        b42_8.invoke()
    if b42_9var.get()>0:
        b42_9.invoke()
    if b42_10var.get()>0:
        b42_10.invoke()
    if b42_11var.get()>0:
        b42_11.invoke()
    if b42_12var.get()>0:
        b42_12.invoke()
    if b42_13var.get()>0:
        b42_13.invoke()
    if b42_14var.get()>0:
        b42_14.invoke()
    if b42_15var.get()>0:
        b42_15.invoke() 
    if b42_17var.get()>0:
        b42_17.invoke()
    if trig_43var.get()>0:
        trig_43.invoke()
        
    if b43_0var.get()>0:
        b43_0.invoke()
    if b43_1var.get()>0:
        b43_1.invoke()
    if b43_2var.get()>0:
        b43_2.invoke()
    if b43_3var.get()>0:
        b43_3.invoke()
    if b43_4var.get()>0:
        b43_4.invoke()
    if b43_5var.get()>0:
        b43_5.invoke()
    if b43_6var.get()>0:
        b43_6.invoke()
    if b43_7var.get()>0:
        b43_7.invoke()
    if b43_8var.get()>0:
        b43_8.invoke()
    if b43_9var.get()>0:
        b43_9.invoke()
    if b43_10var.get()>0:
        b43_10.invoke()
    if b43_11var.get()>0:
        b43_11.invoke()
    if b43_12var.get()>0:
        b43_12.invoke()
    if b43_13var.get()>0:
        b43_13.invoke()
    if b43_14var.get()>0:
        b43_14.invoke()
    if b43_15var.get()>0:
        b43_15.invoke() 
    if b43_17var.get()>0:
        b43_17.invoke()
    if trig_44var.get()>0:
        trig_44.invoke()
        
    if b44_0var.get()>0:
        b44_0.invoke()
    if b44_1var.get()>0:
        b44_1.invoke()
    if b44_2var.get()>0:
        b44_2.invoke()
    if b44_3var.get()>0:
        b44_3.invoke()
    if b44_4var.get()>0:
        b44_4.invoke()
    if b44_5var.get()>0:
        b44_5.invoke()
    if b44_6var.get()>0:
        b44_6.invoke()
    if b44_7var.get()>0:
        b44_7.invoke()
    if b44_8var.get()>0:
        b44_8.invoke()
    if b44_9var.get()>0:
        b44_9.invoke()
    if b44_10var.get()>0:
        b44_10.invoke()
    if b44_11var.get()>0:
        b44_11.invoke()
    if b44_12var.get()>0:
        b44_12.invoke()
    if b44_13var.get()>0:
        b44_13.invoke()
    if b44_14var.get()>0:
        b44_14.invoke()
    if b44_15var.get()>0:
        b44_15.invoke() 
    if b44_17var.get()>0:
        b44_17.invoke()
    if trig_45var.get()>0:
        trig_45.invoke()
        
    if b45_0var.get()>0:
        b45_0.invoke()
    if b45_1var.get()>0:
        b45_1.invoke()
    if b45_2var.get()>0:
        b45_2.invoke()
    if b45_3var.get()>0:
        b45_3.invoke()
    if b45_4var.get()>0:
        b45_4.invoke()
    if b45_5var.get()>0:
        b45_5.invoke()
    if b45_6var.get()>0:
        b45_6.invoke()
    if b45_7var.get()>0:
        b45_7.invoke()
    if b45_8var.get()>0:
        b45_8.invoke()
    if b45_9var.get()>0:
        b45_9.invoke()
    if b45_10var.get()>0:
        b45_10.invoke()
    if b45_11var.get()>0:
        b45_11.invoke()
    if b45_12var.get()>0:
        b45_12.invoke()
    if b45_13var.get()>0:
        b45_13.invoke()
    if b45_14var.get()>0:
        b45_14.invoke()
    if b45_15var.get()>0:
        b45_15.invoke() 
    if b45_17var.get()>0:
        b45_17.invoke()
    if trig_46var.get()>0:
        trig_46.invoke()
        
    if b46_0var.get()>0:
        b46_0.invoke()
    if b46_1var.get()>0:
        b46_1.invoke()
    if b46_2var.get()>0:
        b46_2.invoke()
    if b46_3var.get()>0:
        b46_3.invoke()
    if b46_4var.get()>0:
        b46_4.invoke()
    if b46_5var.get()>0:
        b46_5.invoke()
    if b46_6var.get()>0:
        b46_6.invoke()
    if b46_7var.get()>0:
        b46_7.invoke()
    if b46_8var.get()>0:
        b46_8.invoke()
    if b46_9var.get()>0:
        b46_9.invoke()
    if b46_10var.get()>0:
        b46_10.invoke()
    if b46_11var.get()>0:
        b46_11.invoke()
    if b46_12var.get()>0:
        b46_12.invoke()
    if b46_13var.get()>0:
        b46_13.invoke()
    if b46_14var.get()>0:
        b46_14.invoke()
    if b46_15var.get()>0:
        b46_15.invoke() 
    if b46_17var.get()>0:
        b46_17.invoke()
    if trig_47var.get()>0:
        trig_47.invoke()
        
    if b47_0var.get()>0:
        b47_0.invoke()
    if b47_1var.get()>0:
        b47_1.invoke()
    if b47_2var.get()>0:
        b47_2.invoke()
    if b47_3var.get()>0:
        b47_3.invoke()
    if b47_4var.get()>0:
        b47_4.invoke()
    if b47_5var.get()>0:
        b47_5.invoke()
    if b47_6var.get()>0:
        b47_6.invoke()
    if b47_7var.get()>0:
        b47_7.invoke()
    if b47_8var.get()>0:
        b47_8.invoke()
    if b47_9var.get()>0:
        b47_9.invoke()
    if b47_10var.get()>0:
        b47_10.invoke()
    if b47_11var.get()>0:
        b47_11.invoke()
    if b47_12var.get()>0:
        b47_12.invoke()
    if b47_13var.get()>0:
        b47_13.invoke()
    if b47_14var.get()>0:
        b47_14.invoke()
    if b47_15var.get()>0:
        b47_15.invoke() 
    if b47_17var.get()>0:
        b47_17.invoke()
    if trig_48var.get()>0:
        trig_48.invoke()
        
    if b48_0var.get()>0:
        b48_0.invoke()
    if b48_1var.get()>0:
        b48_1.invoke()
    if b48_2var.get()>0:
        b48_2.invoke()
    if b48_3var.get()>0:
        b48_3.invoke()
    if b48_4var.get()>0:
        b48_4.invoke()
    if b48_5var.get()>0:
        b48_5.invoke()
    if b48_6var.get()>0:
        b48_6.invoke()
    if b48_7var.get()>0:
        b48_7.invoke()
    if b48_8var.get()>0:
        b48_8.invoke()
    if b48_9var.get()>0:
        b48_9.invoke()
    if b48_10var.get()>0:
        b48_10.invoke()
    if b48_11var.get()>0:
        b48_11.invoke()
    if b48_12var.get()>0:
        b48_12.invoke()
    if b48_13var.get()>0:
        b48_13.invoke()
    if b48_14var.get()>0:
        b48_14.invoke()
    if b48_15var.get()>0:
        b48_15.invoke() 
    if b48_17var.get()>0:
        b48_17.invoke()
    if trig_49var.get()>0:
        trig_49.invoke()
        
    if b49_0var.get()>0:
        b49_0.invoke()
    if b49_1var.get()>0:
        b49_1.invoke()
    if b49_2var.get()>0:
        b49_2.invoke()
    if b49_3var.get()>0:
        b49_3.invoke()
    if b49_4var.get()>0:
        b49_4.invoke()
    if b49_5var.get()>0:
        b49_5.invoke()
    if b49_6var.get()>0:
        b49_6.invoke()
    if b49_7var.get()>0:
        b49_7.invoke()
    if b49_8var.get()>0:
        b49_8.invoke()
    if b49_9var.get()>0:
        b49_9.invoke()
    if b49_10var.get()>0:
        b49_10.invoke()
    if b49_11var.get()>0:
        b49_11.invoke()
    if b49_12var.get()>0:
        b49_12.invoke()
    if b49_13var.get()>0:
        b49_13.invoke()
    if b49_14var.get()>0:
        b49_14.invoke()
    if b49_15var.get()>0:
        b49_15.invoke() 
    if b49_17var.get()>0:
        b49_17.invoke()
    if trig_50var.get()>0:
        trig_50.invoke()
        
    if b50_0var.get()>0:
        b50_0.invoke()
    if b50_1var.get()>0:
        b50_1.invoke()
    if b50_2var.get()>0:
        b50_2.invoke()
    if b50_3var.get()>0:
        b50_3.invoke()
    if b50_4var.get()>0:
        b50_4.invoke()
    if b50_5var.get()>0:
        b50_5.invoke()
    if b50_6var.get()>0:
        b50_6.invoke()
    if b50_7var.get()>0:
        b50_7.invoke()
    if b50_8var.get()>0:
        b50_8.invoke()
    if b50_9var.get()>0:
        b50_9.invoke()
    if b50_10var.get()>0:
        b50_10.invoke()
    if b50_11var.get()>0:
        b50_11.invoke()
    if b50_12var.get()>0:
        b50_12.invoke()
    if b50_13var.get()>0:
        b50_13.invoke()
    if b50_14var.get()>0:
        b50_14.invoke()
    if b50_15var.get()>0:
        b50_15.invoke() 
    if b50_17var.get()>0:
        b50_17.invoke()
    if trig_51var.get()>0:
        trig_51.invoke()
       
    if b51_0var.get()>0:
        b51_0.invoke()
    if b51_1var.get()>0:
        b51_1.invoke()
    if b51_2var.get()>0:
        b51_2.invoke()
    if b51_3var.get()>0:
        b51_3.invoke()
    if b51_4var.get()>0:
        b51_4.invoke()
    if b51_5var.get()>0:
        b51_5.invoke()
    if b51_6var.get()>0:
        b51_6.invoke()
    if b51_7var.get()>0:
        b51_7.invoke()
    if b51_8var.get()>0:
        b51_8.invoke()
    if b51_9var.get()>0:
        b51_9.invoke()
    if b51_10var.get()>0:
        b51_10.invoke()
    if b51_11var.get()>0:
        b51_11.invoke()
    if b51_12var.get()>0:
        b51_12.invoke()
    if b51_13var.get()>0:
        b51_13.invoke()
    if b51_14var.get()>0:
        b51_14.invoke()
    if b51_15var.get()>0:
        b51_15.invoke()  
    if b51_17var.get()>0:
        b51_17.invoke()
    if trig_52var.get()>0:
        trig_52.invoke()
       
    if b52_0var.get()>0:
        b52_0.invoke()
    if b52_1var.get()>0:
        b52_1.invoke()
    if b52_2var.get()>0:
        b52_2.invoke()
    if b52_3var.get()>0:
        b52_3.invoke()
    if b52_4var.get()>0:
        b52_4.invoke()
    if b52_5var.get()>0:
        b52_5.invoke()
    if b52_6var.get()>0:
        b52_6.invoke()
    if b52_7var.get()>0:
        b52_7.invoke()
    if b52_8var.get()>0:
        b52_8.invoke()
    if b52_9var.get()>0:
        b52_9.invoke()
    if b52_10var.get()>0:
        b52_10.invoke()
    if b52_11var.get()>0:
        b52_11.invoke()
    if b52_12var.get()>0:
        b52_12.invoke()
    if b52_13var.get()>0:
        b52_13.invoke()
    if b52_14var.get()>0:
        b52_14.invoke()
    if b52_15var.get()>0:
        b52_15.invoke()  
    if b52_17var.get()>0:
        b52_17.invoke()
    if trig_53var.get()>0:
        trig_53.invoke()
       
    if b53_0var.get()>0:
        b53_0.invoke()
    if b53_1var.get()>0:
        b53_1.invoke()
    if b53_2var.get()>0:
        b53_2.invoke()
    if b53_3var.get()>0:
        b53_3.invoke()
    if b53_4var.get()>0:
        b53_4.invoke()
    if b53_5var.get()>0:
        b53_5.invoke()
    if b53_6var.get()>0:
        b53_6.invoke()
    if b53_7var.get()>0:
        b53_7.invoke()
    if b53_8var.get()>0:
        b53_8.invoke()
    if b53_9var.get()>0:
        b53_9.invoke()
    if b53_10var.get()>0:
        b53_10.invoke()
    if b53_11var.get()>0:
        b53_11.invoke()
    if b53_12var.get()>0:
        b53_12.invoke()
    if b53_13var.get()>0:
        b53_13.invoke()
    if b53_14var.get()>0:
        b53_14.invoke()
    if b53_15var.get()>0:
        b53_15.invoke()  
    if b53_17var.get()>0:
        b53_17.invoke()
    if trig_54var.get()>0:
        trig_54.invoke()
       
    if b54_0var.get()>0:
        b54_0.invoke()
    if b54_1var.get()>0:
        b54_1.invoke()
    if b54_2var.get()>0:
        b54_2.invoke()
    if b54_3var.get()>0:
        b54_3.invoke()
    if b54_4var.get()>0:
        b54_4.invoke()
    if b54_5var.get()>0:
        b54_5.invoke()
    if b54_6var.get()>0:
        b54_6.invoke()
    if b54_7var.get()>0:
        b54_7.invoke()
    if b54_8var.get()>0:
        b54_8.invoke()
    if b54_9var.get()>0:
        b54_9.invoke()
    if b54_10var.get()>0:
        b54_10.invoke()
    if b54_11var.get()>0:
        b54_11.invoke()
    if b54_12var.get()>0:
        b54_12.invoke()
    if b54_13var.get()>0:
        b54_13.invoke()
    if b54_14var.get()>0:
        b54_14.invoke()
    if b54_15var.get()>0:
        b54_15.invoke()  
    if b54_17var.get()>0:
        b54_17.invoke()
    if trig_55var.get()>0:
        trig_55.invoke()
       
    if b55_0var.get()>0:
        b55_0.invoke()
    if b55_1var.get()>0:
        b55_1.invoke()
    if b55_2var.get()>0:
        b55_2.invoke()
    if b55_3var.get()>0:
        b55_3.invoke()
    if b55_4var.get()>0:
        b55_4.invoke()
    if b55_5var.get()>0:
        b55_5.invoke()
    if b55_6var.get()>0:
        b55_6.invoke()
    if b55_7var.get()>0:
        b55_7.invoke()
    if b55_8var.get()>0:
        b55_8.invoke()
    if b55_9var.get()>0:
        b55_9.invoke()
    if b55_10var.get()>0:
        b55_10.invoke()
    if b55_11var.get()>0:
        b55_11.invoke()
    if b55_12var.get()>0:
        b55_12.invoke()
    if b55_13var.get()>0:
        b55_13.invoke()
    if b55_14var.get()>0:
        b55_14.invoke()
    if b55_15var.get()>0:
        b55_15.invoke()  
    if b55_17var.get()>0:
        b55_17.invoke()
    if trig_56var.get()>0:
        trig_56.invoke()
       
    if b56_0var.get()>0:
        b56_0.invoke()
    if b56_1var.get()>0:
        b56_1.invoke()
    if b56_2var.get()>0:
        b56_2.invoke()
    if b56_3var.get()>0:
        b56_3.invoke()
    if b56_4var.get()>0:
        b56_4.invoke()
    if b56_5var.get()>0:
        b56_5.invoke()
    if b56_6var.get()>0:
        b56_6.invoke()
    if b56_7var.get()>0:
        b56_7.invoke()
    if b56_8var.get()>0:
        b56_8.invoke()
    if b56_9var.get()>0:
        b56_9.invoke()
    if b56_10var.get()>0:
        b56_10.invoke()
    if b56_11var.get()>0:
        b56_11.invoke()
    if b56_12var.get()>0:
        b56_12.invoke()
    if b56_13var.get()>0:
        b56_13.invoke()
    if b56_14var.get()>0:
        b56_14.invoke()
    if b56_15var.get()>0:
        b56_15.invoke()  
    if b56_17var.get()>0:
        b56_17.invoke()
    if trig_57var.get()>0:
        trig_57.invoke()
       
    if b57_0var.get()>0:
        b57_0.invoke()
    if b57_1var.get()>0:
        b57_1.invoke()
    if b57_2var.get()>0:
        b57_2.invoke()
    if b57_3var.get()>0:
        b57_3.invoke()
    if b57_4var.get()>0:
        b57_4.invoke()
    if b57_5var.get()>0:
        b57_5.invoke()
    if b57_6var.get()>0:
        b57_6.invoke()
    if b57_7var.get()>0:
        b57_7.invoke()
    if b57_8var.get()>0:
        b57_8.invoke()
    if b57_9var.get()>0:
        b57_9.invoke()
    if b57_10var.get()>0:
        b57_10.invoke()
    if b57_11var.get()>0:
        b57_11.invoke()
    if b57_12var.get()>0:
        b57_12.invoke()
    if b57_13var.get()>0:
        b57_13.invoke()
    if b57_14var.get()>0:
        b57_14.invoke()
    if b57_15var.get()>0:
        b57_15.invoke()  
    if b57_17var.get()>0:
        b57_17.invoke()
    if trig_58var.get()>0:
        trig_58.invoke()
       
    if b58_0var.get()>0:
        b58_0.invoke()
    if b58_1var.get()>0:
        b58_1.invoke()
    if b58_2var.get()>0:
        b58_2.invoke()
    if b58_3var.get()>0:
        b58_3.invoke()
    if b58_4var.get()>0:
        b58_4.invoke()
    if b58_5var.get()>0:
        b58_5.invoke()
    if b58_6var.get()>0:
        b58_6.invoke()
    if b58_7var.get()>0:
        b58_7.invoke()
    if b58_8var.get()>0:
        b58_8.invoke()
    if b58_9var.get()>0:
        b58_9.invoke()
    if b58_10var.get()>0:
        b58_10.invoke()
    if b58_11var.get()>0:
        b58_11.invoke()
    if b58_12var.get()>0:
        b58_12.invoke()
    if b58_13var.get()>0:
        b58_13.invoke()
    if b58_14var.get()>0:
        b58_14.invoke()
    if b58_15var.get()>0:
        b58_15.invoke()  
    if b58_17var.get()>0:
        b58_17.invoke()
    if trig_59var.get()>0:
        trig_59.invoke()
       
    if b59_0var.get()>0:
        b59_0.invoke()
    if b59_1var.get()>0:
        b59_1.invoke()
    if b59_2var.get()>0:
        b59_2.invoke()
    if b59_3var.get()>0:
        b59_3.invoke()
    if b59_4var.get()>0:
        b59_4.invoke()
    if b59_5var.get()>0:
        b59_5.invoke()
    if b59_6var.get()>0:
        b59_6.invoke()
    if b59_7var.get()>0:
        b59_7.invoke()
    if b59_8var.get()>0:
        b59_8.invoke()
    if b59_9var.get()>0:
        b59_9.invoke()
    if b59_10var.get()>0:
        b59_10.invoke()
    if b59_11var.get()>0:
        b59_11.invoke()
    if b59_12var.get()>0:
        b59_12.invoke()
    if b59_13var.get()>0:
        b59_13.invoke()
    if b59_14var.get()>0:
        b59_14.invoke()
    if b59_15var.get()>0:
        b59_15.invoke()  
    if b59_17var.get()>0:
        b59_17.invoke()
    if trig_60var.get()>0:
        trig_60.invoke()
       
    if b60_0var.get()>0:
        b60_0.invoke()
    if b60_1var.get()>0:
        b60_1.invoke()
    if b60_2var.get()>0:
        b60_2.invoke()
    if b60_3var.get()>0:
        b60_3.invoke()
    if b60_4var.get()>0:
        b60_4.invoke()
    if b60_5var.get()>0:
        b60_5.invoke()
    if b60_6var.get()>0:
        b60_6.invoke()
    if b60_7var.get()>0:
        b60_7.invoke()
    if b60_8var.get()>0:
        b60_8.invoke()
    if b60_9var.get()>0:
        b60_9.invoke()
    if b60_10var.get()>0:
        b60_10.invoke()
    if b60_11var.get()>0:
        b60_11.invoke()
    if b60_12var.get()>0:
        b60_12.invoke()
    if b60_13var.get()>0:
        b60_13.invoke()
    if b60_14var.get()>0:
        b60_14.invoke()
    if b60_15var.get()>0:
        b60_15.invoke()  
    if b60_17var.get()>0:
        b60_17.invoke()
    if trig_61var.get()>0:
        trig_61.invoke()
       
    if b61_0var.get()>0:
        b61_0.invoke()
    if b61_1var.get()>0:
        b61_1.invoke()
    if b61_2var.get()>0:
        b61_2.invoke()
    if b61_3var.get()>0:
        b61_3.invoke()
    if b61_4var.get()>0:
        b61_4.invoke()
    if b61_5var.get()>0:
        b61_5.invoke()
    if b61_6var.get()>0:
        b61_6.invoke()
    if b61_7var.get()>0:
        b61_7.invoke()
    if b61_8var.get()>0:
        b61_8.invoke()
    if b61_9var.get()>0:
        b61_9.invoke()
    if b61_10var.get()>0:
        b61_10.invoke()
    if b61_11var.get()>0:
        b61_11.invoke()
    if b61_12var.get()>0:
        b61_12.invoke()
    if b61_13var.get()>0:
        b61_13.invoke()
    if b61_14var.get()>0:
        b61_14.invoke()
    if b61_15var.get()>0:
        b61_15.invoke()  
    if b61_17var.get()>0:
        b61_17.invoke()
    if trig_62var.get()>0:
        trig_62.invoke()
       
    if b62_0var.get()>0:
        b62_0.invoke()
    if b62_1var.get()>0:
        b62_1.invoke()
    if b62_2var.get()>0:
        b62_2.invoke()
    if b62_3var.get()>0:
        b62_3.invoke()
    if b62_4var.get()>0:
        b62_4.invoke()
    if b62_5var.get()>0:
        b62_5.invoke()
    if b62_6var.get()>0:
        b62_6.invoke()
    if b62_7var.get()>0:
        b62_7.invoke()
    if b62_8var.get()>0:
        b62_8.invoke()
    if b62_9var.get()>0:
        b62_9.invoke()
    if b62_10var.get()>0:
        b62_10.invoke()
    if b62_11var.get()>0:
        b62_11.invoke()
    if b62_12var.get()>0:
        b62_12.invoke()
    if b62_13var.get()>0:
        b62_13.invoke()
    if b62_14var.get()>0:
        b62_14.invoke()
    if b62_15var.get()>0:
        b62_15.invoke()  
    if b62_17var.get()>0:
        b62_17.invoke()
    if trig_63var.get()>0:
        trig_63.invoke()
       
    if b63_0var.get()>0:
        b63_0.invoke()
    if b63_1var.get()>0:
        b63_1.invoke()
    if b63_2var.get()>0:
        b63_2.invoke()
    if b63_3var.get()>0:
        b63_3.invoke()
    if b63_4var.get()>0:
        b63_4.invoke()
    if b63_5var.get()>0:
        b63_5.invoke()
    if b63_6var.get()>0:
        b63_6.invoke()
    if b63_7var.get()>0:
        b63_7.invoke()
    if b63_8var.get()>0:
        b63_8.invoke()
    if b63_9var.get()>0:
        b63_9.invoke()
    if b63_10var.get()>0:
        b63_10.invoke()
    if b63_11var.get()>0:
        b63_11.invoke()
    if b63_12var.get()>0:
        b63_12.invoke()
    if b63_13var.get()>0:
        b63_13.invoke()
    if b63_14var.get()>0:
        b63_14.invoke()
    if b63_15var.get()>0:
        b63_15.invoke()  
    if b63_17var.get()>0:
        b63_17.invoke()
    if trig_64var.get()>0:
        trig_64.invoke()
       
    if b64_0var.get()>0:
        b64_0.invoke()
    if b64_1var.get()>0:
        b64_1.invoke()
    if b64_2var.get()>0:
        b64_2.invoke()
    if b64_3var.get()>0:
        b64_3.invoke()
    if b64_4var.get()>0:
        b64_4.invoke()
    if b64_5var.get()>0:
        b64_5.invoke()
    if b64_6var.get()>0:
        b64_6.invoke()
    if b64_7var.get()>0:
        b64_7.invoke()
    if b64_8var.get()>0:
        b64_8.invoke()
    if b64_9var.get()>0:
        b64_9.invoke()
    if b64_10var.get()>0:
        b64_10.invoke()
    if b64_11var.get()>0:
        b64_11.invoke()
    if b64_12var.get()>0:
        b64_12.invoke()
    if b64_13var.get()>0:
        b64_13.invoke()
    if b64_14var.get()>0:
        b64_14.invoke()
    if b64_15var.get()>0:
        b64_15.invoke()  
    if b64_17var.get()>0:
        b64_17.invoke()
    if trig_65var.get()>0:
        trig_65.invoke()
       
    if b65_0var.get()>0:
        b65_0.invoke()
    if b65_1var.get()>0:
        b65_1.invoke()
    if b65_2var.get()>0:
        b65_2.invoke()
    if b65_3var.get()>0:
        b65_3.invoke()
    if b65_4var.get()>0:
        b65_4.invoke()
    if b65_5var.get()>0:
        b65_5.invoke()
    if b65_6var.get()>0:
        b65_6.invoke()
    if b65_7var.get()>0:
        b65_7.invoke()
    if b65_8var.get()>0:
        b65_8.invoke()
    if b65_9var.get()>0:
        b65_9.invoke()
    if b65_10var.get()>0:
        b65_10.invoke()
    if b65_11var.get()>0:
        b65_11.invoke()
    if b65_12var.get()>0:
        b65_12.invoke()
    if b65_13var.get()>0:
        b65_13.invoke()
    if b65_14var.get()>0:
        b65_14.invoke()
    if b65_15var.get()>0:
        b65_15.invoke()  
    if b65_17var.get()>0:
        b65_17.invoke()
    if trig_66var.get()>0:
        trig_66.invoke()
       
    if b66_0var.get()>0:
        b66_0.invoke()
    if b66_1var.get()>0:
        b66_1.invoke()
    if b66_2var.get()>0:
        b66_2.invoke()
    if b66_3var.get()>0:
        b66_3.invoke()
    if b66_4var.get()>0:
        b66_4.invoke()
    if b66_5var.get()>0:
        b66_5.invoke()
    if b66_6var.get()>0:
        b66_6.invoke()
    if b66_7var.get()>0:
        b66_7.invoke()
    if b66_8var.get()>0:
        b66_8.invoke()
    if b66_9var.get()>0:
        b66_9.invoke()
    if b66_10var.get()>0:
        b66_10.invoke()
    if b66_11var.get()>0:
        b66_11.invoke()
    if b66_12var.get()>0:
        b66_12.invoke()
    if b66_13var.get()>0:
        b66_13.invoke()
    if b66_14var.get()>0:
        b66_14.invoke()
    if b66_15var.get()>0:
        b66_15.invoke()  
    if b66_17var.get()>0:
        b66_17.invoke()
    if trig_67var.get()>0:
        trig_67.invoke()
       
    if b67_0var.get()>0:
        b67_0.invoke()
    if b67_1var.get()>0:
        b67_1.invoke()
    if b67_2var.get()>0:
        b67_2.invoke()
    if b67_3var.get()>0:
        b67_3.invoke()
    if b67_4var.get()>0:
        b67_4.invoke()
    if b67_5var.get()>0:
        b67_5.invoke()
    if b67_6var.get()>0:
        b67_6.invoke()
    if b67_7var.get()>0:
        b67_7.invoke()
    if b67_8var.get()>0:
        b67_8.invoke()
    if b67_9var.get()>0:
        b67_9.invoke()
    if b67_10var.get()>0:
        b67_10.invoke()
    if b67_11var.get()>0:
        b67_11.invoke()
    if b67_12var.get()>0:
        b67_12.invoke()
    if b67_13var.get()>0:
        b67_13.invoke()
    if b67_14var.get()>0:
        b67_14.invoke()
    if b67_15var.get()>0:
        b67_15.invoke()  
    if b67_17var.get()>0:
        b67_17.invoke()
    if trig_68var.get()>0:
        trig_68.invoke()
       
    if b68_0var.get()>0:
        b68_0.invoke()
    if b68_1var.get()>0:
        b68_1.invoke()
    if b68_2var.get()>0:
        b68_2.invoke()
    if b68_3var.get()>0:
        b68_3.invoke()
    if b68_4var.get()>0:
        b68_4.invoke()
    if b68_5var.get()>0:
        b68_5.invoke()
    if b68_6var.get()>0:
        b68_6.invoke()
    if b68_7var.get()>0:
        b68_7.invoke()
    if b68_8var.get()>0:
        b68_8.invoke()
    if b68_9var.get()>0:
        b68_9.invoke()
    if b68_10var.get()>0:
        b68_10.invoke()
    if b68_11var.get()>0:
        b68_11.invoke()
    if b68_12var.get()>0:
        b68_12.invoke()
    if b68_13var.get()>0:
        b68_13.invoke()
    if b68_14var.get()>0:
        b68_14.invoke()
    if b68_15var.get()>0:
        b68_15.invoke()  
    if b68_17var.get()>0:
        b68_17.invoke()
    if trig_69var.get()>0:
        trig_69.invoke()
       
    if b69_0var.get()>0:
        b69_0.invoke()
    if b69_1var.get()>0:
        b69_1.invoke()
    if b69_2var.get()>0:
        b69_2.invoke()
    if b69_3var.get()>0:
        b69_3.invoke()
    if b69_4var.get()>0:
        b69_4.invoke()
    if b69_5var.get()>0:
        b69_5.invoke()
    if b69_6var.get()>0:
        b69_6.invoke()
    if b69_7var.get()>0:
        b69_7.invoke()
    if b69_8var.get()>0:
        b69_8.invoke()
    if b69_9var.get()>0:
        b69_9.invoke()
    if b69_10var.get()>0:
        b69_10.invoke()
    if b69_11var.get()>0:
        b69_11.invoke()
    if b69_12var.get()>0:
        b69_12.invoke()
    if b69_13var.get()>0:
        b69_13.invoke()
    if b69_14var.get()>0:
        b69_14.invoke()
    if b69_15var.get()>0:
        b69_15.invoke()  
    if b69_17var.get()>0:
        b69_17.invoke()
    if trig_70var.get()>0:
        trig_70.invoke()
       
    if b70_0var.get()>0:
        b70_0.invoke()
    if b70_1var.get()>0:
        b70_1.invoke()
    if b70_2var.get()>0:
        b70_2.invoke()
    if b70_3var.get()>0:
        b70_3.invoke()
    if b70_4var.get()>0:
        b70_4.invoke()
    if b70_5var.get()>0:
        b70_5.invoke()
    if b70_6var.get()>0:
        b70_6.invoke()
    if b70_7var.get()>0:
        b70_7.invoke()
    if b70_8var.get()>0:
        b70_8.invoke()
    if b70_9var.get()>0:
        b70_9.invoke()
    if b70_10var.get()>0:
        b70_10.invoke()
    if b70_11var.get()>0:
        b70_11.invoke()
    if b70_12var.get()>0:
        b70_12.invoke()
    if b70_13var.get()>0:
        b70_13.invoke()
    if b70_14var.get()>0:
        b70_14.invoke()
    if b70_15var.get()>0:
        b70_15.invoke()  
    if b70_17var.get()>0:
        b70_17.invoke()
    if trig_71var.get()>0:
        trig_71.invoke()
       
    if b71_0var.get()>0:
        b71_0.invoke()
    if b71_1var.get()>0:
        b71_1.invoke()
    if b71_2var.get()>0:
        b71_2.invoke()
    if b71_3var.get()>0:
        b71_3.invoke()
    if b71_4var.get()>0:
        b71_4.invoke()
    if b71_5var.get()>0:
        b71_5.invoke()
    if b71_6var.get()>0:
        b71_6.invoke()
    if b71_7var.get()>0:
        b71_7.invoke()
    if b71_8var.get()>0:
        b71_8.invoke()
    if b71_9var.get()>0:
        b71_9.invoke()
    if b71_10var.get()>0:
        b71_10.invoke()
    if b71_11var.get()>0:
        b71_11.invoke()
    if b71_12var.get()>0:
        b71_12.invoke()
    if b71_13var.get()>0:
        b71_13.invoke()
    if b71_14var.get()>0:
        b71_14.invoke()
    if b71_15var.get()>0:
        b71_15.invoke()  
    if b71_17var.get()>0:
        b71_17.invoke()
    if trig_72var.get()>0:
        trig_72.invoke()
       
    if b72_0var.get()>0:
        b72_0.invoke()
    if b72_1var.get()>0:
        b72_1.invoke()
    if b72_2var.get()>0:
        b72_2.invoke()
    if b72_3var.get()>0:
        b72_3.invoke()
    if b72_4var.get()>0:
        b72_4.invoke()
    if b72_5var.get()>0:
        b72_5.invoke()
    if b72_6var.get()>0:
        b72_6.invoke()
    if b72_7var.get()>0:
        b72_7.invoke()
    if b72_8var.get()>0:
        b72_8.invoke()
    if b72_9var.get()>0:
        b72_9.invoke()
    if b72_10var.get()>0:
        b72_10.invoke()
    if b72_11var.get()>0:
        b72_11.invoke()
    if b72_12var.get()>0:
        b72_12.invoke()
    if b72_13var.get()>0:
        b72_13.invoke()
    if b72_14var.get()>0:
        b72_14.invoke()
    if b72_15var.get()>0:
        b72_15.invoke()  
    if b72_17var.get()>0:
        b72_17.invoke()
    if trig_73var.get()>0:
        trig_73.invoke()
       
    if b73_0var.get()>0:
        b73_0.invoke()
    if b73_1var.get()>0:
        b73_1.invoke()
    if b73_2var.get()>0:
        b73_2.invoke()
    if b73_3var.get()>0:
        b73_3.invoke()
    if b73_4var.get()>0:
        b73_4.invoke()
    if b73_5var.get()>0:
        b73_5.invoke()
    if b73_6var.get()>0:
        b73_6.invoke()
    if b73_7var.get()>0:
        b73_7.invoke()
    if b73_8var.get()>0:
        b73_8.invoke()
    if b73_9var.get()>0:
        b73_9.invoke()
    if b73_10var.get()>0:
        b73_10.invoke()
    if b73_11var.get()>0:
        b73_11.invoke()
    if b73_12var.get()>0:
        b73_12.invoke()
    if b73_13var.get()>0:
        b73_13.invoke()
    if b73_14var.get()>0:
        b73_14.invoke()
    if b73_15var.get()>0:
        b73_15.invoke()  
    if b73_17var.get()>0:
        b73_17.invoke()
    if trig_74var.get()>0:
        trig_74.invoke()
       
    if b74_0var.get()>0:
        b74_0.invoke()
    if b74_1var.get()>0:
        b74_1.invoke()
    if b74_2var.get()>0:
        b74_2.invoke()
    if b74_3var.get()>0:
        b74_3.invoke()
    if b74_4var.get()>0:
        b74_4.invoke()
    if b74_5var.get()>0:
        b74_5.invoke()
    if b74_6var.get()>0:
        b74_6.invoke()
    if b74_7var.get()>0:
        b74_7.invoke()
    if b74_8var.get()>0:
        b74_8.invoke()
    if b74_9var.get()>0:
        b74_9.invoke()
    if b74_10var.get()>0:
        b74_10.invoke()
    if b74_11var.get()>0:
        b74_11.invoke()
    if b74_12var.get()>0:
        b74_12.invoke()
    if b74_13var.get()>0:
        b74_13.invoke()
    if b74_14var.get()>0:
        b74_14.invoke()
    if b74_15var.get()>0:
        b74_15.invoke()  
    if b74_17var.get()>0:
        b74_17.invoke()
    if trig_75var.get()>0:
        trig_75.invoke()
       
    if b75_0var.get()>0:
        b75_0.invoke()
    if b75_1var.get()>0:
        b75_1.invoke()
    if b75_2var.get()>0:
        b75_2.invoke()
    if b75_3var.get()>0:
        b75_3.invoke()
    if b75_4var.get()>0:
        b75_4.invoke()
    if b75_5var.get()>0:
        b75_5.invoke()
    if b75_6var.get()>0:
        b75_6.invoke()
    if b75_7var.get()>0:
        b75_7.invoke()
    if b75_8var.get()>0:
        b75_8.invoke()
    if b75_9var.get()>0:
        b75_9.invoke()
    if b75_10var.get()>0:
        b75_10.invoke()
    if b75_11var.get()>0:
        b75_11.invoke()
    if b75_12var.get()>0:
        b75_12.invoke()
    if b75_13var.get()>0:
        b75_13.invoke()
    if b75_14var.get()>0:
        b75_14.invoke()
    if b75_15var.get()>0:
        b75_15.invoke()  
    if b75_17var.get()>0:
        b75_17.invoke()
    if trig_76var.get()>0:
        trig_76.invoke()
       
    if b76_0var.get()>0:
        b76_0.invoke()
    if b76_1var.get()>0:
        b76_1.invoke()
    if b76_2var.get()>0:
        b76_2.invoke()
    if b76_3var.get()>0:
        b76_3.invoke()
    if b76_4var.get()>0:
        b76_4.invoke()
    if b76_5var.get()>0:
        b76_5.invoke()
    if b76_6var.get()>0:
        b76_6.invoke()
    if b76_7var.get()>0:
        b76_7.invoke()
    if b76_8var.get()>0:
        b76_8.invoke()
    if b76_9var.get()>0:
        b76_9.invoke()
    if b76_10var.get()>0:
        b76_10.invoke()
    if b76_11var.get()>0:
        b76_11.invoke()
    if b76_12var.get()>0:
        b76_12.invoke()
    if b76_13var.get()>0:
        b76_13.invoke()
    if b76_14var.get()>0:
        b76_14.invoke()
    if b76_15var.get()>0:
        b76_15.invoke()  
    if b76_17var.get()>0:
        b76_17.invoke()
    if trig_77var.get()>0:
        trig_77.invoke()
       
    if b77_0var.get()>0:
        b77_0.invoke()
    if b77_1var.get()>0:
        b77_1.invoke()
    if b77_2var.get()>0:
        b77_2.invoke()
    if b77_3var.get()>0:
        b77_3.invoke()
    if b77_4var.get()>0:
        b77_4.invoke()
    if b77_5var.get()>0:
        b77_5.invoke()
    if b77_6var.get()>0:
        b77_6.invoke()
    if b77_7var.get()>0:
        b77_7.invoke()
    if b77_8var.get()>0:
        b77_8.invoke()
    if b77_9var.get()>0:
        b77_9.invoke()
    if b77_10var.get()>0:
        b77_10.invoke()
    if b77_11var.get()>0:
        b77_11.invoke()
    if b77_12var.get()>0:
        b77_12.invoke()
    if b77_13var.get()>0:
        b77_13.invoke()
    if b77_14var.get()>0:
        b77_14.invoke()
    if b77_15var.get()>0:
        b77_15.invoke()  
    if b77_17var.get()>0:
        b77_17.invoke()
    if trig_78var.get()>0:
        trig_78.invoke()
       
    if b78_0var.get()>0:
        b78_0.invoke()
    if b78_1var.get()>0:
        b78_1.invoke()
    if b78_2var.get()>0:
        b78_2.invoke()
    if b78_3var.get()>0:
        b78_3.invoke()
    if b78_4var.get()>0:
        b78_4.invoke()
    if b78_5var.get()>0:
        b78_5.invoke()
    if b78_6var.get()>0:
        b78_6.invoke()
    if b78_7var.get()>0:
        b78_7.invoke()
    if b78_8var.get()>0:
        b78_8.invoke()
    if b78_9var.get()>0:
        b78_9.invoke()
    if b78_10var.get()>0:
        b78_10.invoke()
    if b78_11var.get()>0:
        b78_11.invoke()
    if b78_12var.get()>0:
        b78_12.invoke()
    if b78_13var.get()>0:
        b78_13.invoke()
    if b78_14var.get()>0:
        b78_14.invoke()
    if b78_15var.get()>0:
        b78_15.invoke()  
    if b78_17var.get()>0:
        b78_17.invoke()
    if trig_79var.get()>0:
        trig_79.invoke()
       
    if b79_0var.get()>0:
        b79_0.invoke()
    if b79_1var.get()>0:
        b79_1.invoke()
    if b79_2var.get()>0:
        b79_2.invoke()
    if b79_3var.get()>0:
        b79_3.invoke()
    if b79_4var.get()>0:
        b79_4.invoke()
    if b79_5var.get()>0:
        b79_5.invoke()
    if b79_6var.get()>0:
        b79_6.invoke()
    if b79_7var.get()>0:
        b79_7.invoke()
    if b79_8var.get()>0:
        b79_8.invoke()
    if b79_9var.get()>0:
        b79_9.invoke()
    if b79_10var.get()>0:
        b79_10.invoke()
    if b79_11var.get()>0:
        b79_11.invoke()
    if b79_12var.get()>0:
        b79_12.invoke()
    if b79_13var.get()>0:
        b79_13.invoke()
    if b79_14var.get()>0:
        b79_14.invoke()
    if b79_15var.get()>0:
        b79_15.invoke()  
    if b79_17var.get()>0:
        b79_17.invoke()
    if trig_80var.get()>0:
        trig_80.invoke()
       
    if b80_0var.get()>0:
        b80_0.invoke()
    if b80_1var.get()>0:
        b80_1.invoke()
    if b80_2var.get()>0:
        b80_2.invoke()
    if b80_3var.get()>0:
        b80_3.invoke()
    if b80_4var.get()>0:
        b80_4.invoke()
    if b80_5var.get()>0:
        b80_5.invoke()
    if b80_6var.get()>0:
        b80_6.invoke()
    if b80_7var.get()>0:
        b80_7.invoke()
    if b80_8var.get()>0:
        b80_8.invoke()
    if b80_9var.get()>0:
        b80_9.invoke()
    if b80_10var.get()>0:
        b80_10.invoke()
    if b80_11var.get()>0:
        b80_11.invoke()
    if b80_12var.get()>0:
        b80_12.invoke()
    if b80_13var.get()>0:
        b80_13.invoke()
    if b80_14var.get()>0:
        b80_14.invoke()
    if b80_15var.get()>0:
        b80_15.invoke()  
    if b80_17var.get()>0:
        b80_17.invoke()
    if trig_81var.get()>0:
        trig_81.invoke()
       
    if b81_0var.get()>0:
        b81_0.invoke()
    if b81_1var.get()>0:
        b81_1.invoke()
    if b81_2var.get()>0:
        b81_2.invoke()
    if b81_3var.get()>0:
        b81_3.invoke()
    if b81_4var.get()>0:
        b81_4.invoke()
    if b81_5var.get()>0:
        b81_5.invoke()
    if b81_6var.get()>0:
        b81_6.invoke()
    if b81_7var.get()>0:
        b81_7.invoke()
    if b81_8var.get()>0:
        b81_8.invoke()
    if b81_9var.get()>0:
        b81_9.invoke()
    if b81_10var.get()>0:
        b81_10.invoke()
    if b81_11var.get()>0:
        b81_11.invoke()
    if b81_12var.get()>0:
        b81_12.invoke()
    if b81_13var.get()>0:
        b81_13.invoke()
    if b81_14var.get()>0:
        b81_14.invoke()
    if b81_15var.get()>0:
        b81_15.invoke()  
    if b81_17var.get()>0:
        b81_17.invoke()
    if trig_82var.get()>0:
        trig_82.invoke()
       
    if b82_0var.get()>0:
        b82_0.invoke()
    if b82_1var.get()>0:
        b82_1.invoke()
    if b82_2var.get()>0:
        b82_2.invoke()
    if b82_3var.get()>0:
        b82_3.invoke()
    if b82_4var.get()>0:
        b82_4.invoke()
    if b82_5var.get()>0:
        b82_5.invoke()
    if b82_6var.get()>0:
        b82_6.invoke()
    if b82_7var.get()>0:
        b82_7.invoke()
    if b82_8var.get()>0:
        b82_8.invoke()
    if b82_9var.get()>0:
        b82_9.invoke()
    if b82_10var.get()>0:
        b82_10.invoke()
    if b82_11var.get()>0:
        b82_11.invoke()
    if b82_12var.get()>0:
        b82_12.invoke()
    if b82_13var.get()>0:
        b82_13.invoke()
    if b82_14var.get()>0:
        b82_14.invoke()
    if b82_15var.get()>0:
        b82_15.invoke()  
    if b82_17var.get()>0:
        b82_17.invoke()
    if trig_83var.get()>0:
        trig_83.invoke()
       
    if b83_0var.get()>0:
        b83_0.invoke()
    if b83_1var.get()>0:
        b83_1.invoke()
    if b83_2var.get()>0:
        b83_2.invoke()
    if b83_3var.get()>0:
        b83_3.invoke()
    if b83_4var.get()>0:
        b83_4.invoke()
    if b83_5var.get()>0:
        b83_5.invoke()
    if b83_6var.get()>0:
        b83_6.invoke()
    if b83_7var.get()>0:
        b83_7.invoke()
    if b83_8var.get()>0:
        b83_8.invoke()
    if b83_9var.get()>0:
        b83_9.invoke()
    if b83_10var.get()>0:
        b83_10.invoke()
    if b83_11var.get()>0:
        b83_11.invoke()
    if b83_12var.get()>0:
        b83_12.invoke()
    if b83_13var.get()>0:
        b83_13.invoke()
    if b83_14var.get()>0:
        b83_14.invoke()
    if b83_15var.get()>0:
        b83_15.invoke()  
    if b83_17var.get()>0:
        b83_17.invoke()
    if trig_84var.get()>0:
        trig_84.invoke()
       
    if b84_0var.get()>0:
        b84_0.invoke()
    if b84_1var.get()>0:
        b84_1.invoke()
    if b84_2var.get()>0:
        b84_2.invoke()
    if b84_3var.get()>0:
        b84_3.invoke()
    if b84_4var.get()>0:
        b84_4.invoke()
    if b84_5var.get()>0:
        b84_5.invoke()
    if b84_6var.get()>0:
        b84_6.invoke()
    if b84_7var.get()>0:
        b84_7.invoke()
    if b84_8var.get()>0:
        b84_8.invoke()
    if b84_9var.get()>0:
        b84_9.invoke()
    if b84_10var.get()>0:
        b84_10.invoke()
    if b84_11var.get()>0:
        b84_11.invoke()
    if b84_12var.get()>0:
        b84_12.invoke()
    if b84_13var.get()>0:
        b84_13.invoke()
    if b84_14var.get()>0:
        b84_14.invoke()
    if b84_15var.get()>0:
        b84_15.invoke()  
    if b84_17var.get()>0:
        b84_17.invoke()
    if trig_85var.get()>0:
        trig_85.invoke()
       
    if b85_0var.get()>0:
        b85_0.invoke()
    if b85_1var.get()>0:
        b85_1.invoke()
    if b85_2var.get()>0:
        b85_2.invoke()
    if b85_3var.get()>0:
        b85_3.invoke()
    if b85_4var.get()>0:
        b85_4.invoke()
    if b85_5var.get()>0:
        b85_5.invoke()
    if b85_6var.get()>0:
        b85_6.invoke()
    if b85_7var.get()>0:
        b85_7.invoke()
    if b85_8var.get()>0:
        b85_8.invoke()
    if b85_9var.get()>0:
        b85_9.invoke()
    if b85_10var.get()>0:
        b85_10.invoke()
    if b85_11var.get()>0:
        b85_11.invoke()
    if b85_12var.get()>0:
        b85_12.invoke()
    if b85_13var.get()>0:
        b85_13.invoke()
    if b85_14var.get()>0:
        b85_14.invoke()
    if b85_15var.get()>0:
        b85_15.invoke()  
    if b85_17var.get()>0:
        b85_17.invoke()
    if trig_86var.get()>0:
        trig_86.invoke()
       
    if b86_0var.get()>0:
        b86_0.invoke()
    if b86_1var.get()>0:
        b86_1.invoke()
    if b86_2var.get()>0:
        b86_2.invoke()
    if b86_3var.get()>0:
        b86_3.invoke()
    if b86_4var.get()>0:
        b86_4.invoke()
    if b86_5var.get()>0:
        b86_5.invoke()
    if b86_6var.get()>0:
        b86_6.invoke()
    if b86_7var.get()>0:
        b86_7.invoke()
    if b86_8var.get()>0:
        b86_8.invoke()
    if b86_9var.get()>0:
        b86_9.invoke()
    if b86_10var.get()>0:
        b86_10.invoke()
    if b86_11var.get()>0:
        b86_11.invoke()
    if b86_12var.get()>0:
        b86_12.invoke()
    if b86_13var.get()>0:
        b86_13.invoke()
    if b86_14var.get()>0:
        b86_14.invoke()
    if b86_15var.get()>0:
        b86_15.invoke()  
    if b86_17var.get()>0:
        b86_17.invoke()
    if trig_87var.get()>0:
        trig_87.invoke()
       
    if b87_0var.get()>0:
        b87_0.invoke()
    if b87_1var.get()>0:
        b87_1.invoke()
    if b87_2var.get()>0:
        b87_2.invoke()
    if b87_3var.get()>0:
        b87_3.invoke()
    if b87_4var.get()>0:
        b87_4.invoke()
    if b87_5var.get()>0:
        b87_5.invoke()
    if b87_6var.get()>0:
        b87_6.invoke()
    if b87_7var.get()>0:
        b87_7.invoke()
    if b87_8var.get()>0:
        b87_8.invoke()
    if b87_9var.get()>0:
        b87_9.invoke()
    if b87_10var.get()>0:
        b87_10.invoke()
    if b87_11var.get()>0:
        b87_11.invoke()
    if b87_12var.get()>0:
        b87_12.invoke()
    if b87_13var.get()>0:
        b87_13.invoke()
    if b87_14var.get()>0:
        b87_14.invoke()
    if b87_15var.get()>0:
        b87_15.invoke()  
    if b87_17var.get()>0:
        b87_17.invoke()
    if trig_88var.get()>0:
        trig_88.invoke()
       
    if b88_0var.get()>0:
        b88_0.invoke()
    if b88_1var.get()>0:
        b88_1.invoke()
    if b88_2var.get()>0:
        b88_2.invoke()
    if b88_3var.get()>0:
        b88_3.invoke()
    if b88_4var.get()>0:
        b88_4.invoke()
    if b88_5var.get()>0:
        b88_5.invoke()
    if b88_6var.get()>0:
        b88_6.invoke()
    if b88_7var.get()>0:
        b88_7.invoke()
    if b88_8var.get()>0:
        b88_8.invoke()
    if b88_9var.get()>0:
        b88_9.invoke()
    if b88_10var.get()>0:
        b88_10.invoke()
    if b88_11var.get()>0:
        b88_11.invoke()
    if b88_12var.get()>0:
        b88_12.invoke()
    if b88_13var.get()>0:
        b88_13.invoke()
    if b88_14var.get()>0:
        b88_14.invoke()
    if b88_15var.get()>0:
        b88_15.invoke()  
    if b88_17var.get()>0:
        b88_17.invoke()
    if trig_89var.get()>0:
        trig_89.invoke()
       
    if b89_0var.get()>0:
        b89_0.invoke()
    if b89_1var.get()>0:
        b89_1.invoke()
    if b89_2var.get()>0:
        b89_2.invoke()
    if b89_3var.get()>0:
        b89_3.invoke()
    if b89_4var.get()>0:
        b89_4.invoke()
    if b89_5var.get()>0:
        b89_5.invoke()
    if b89_6var.get()>0:
        b89_6.invoke()
    if b89_7var.get()>0:
        b89_7.invoke()
    if b89_8var.get()>0:
        b89_8.invoke()
    if b89_9var.get()>0:
        b89_9.invoke()
    if b89_10var.get()>0:
        b89_10.invoke()
    if b89_11var.get()>0:
        b89_11.invoke()
    if b89_12var.get()>0:
        b89_12.invoke()
    if b89_13var.get()>0:
        b89_13.invoke()
    if b89_14var.get()>0:
        b89_14.invoke()
    if b89_15var.get()>0:
        b89_15.invoke()  
    if b89_17var.get()>0:
        b89_17.invoke()
    if trig_90var.get()>0:
        trig_90.invoke()
       
    if b90_0var.get()>0:
        b90_0.invoke()
    if b90_1var.get()>0:
        b90_1.invoke()
    if b90_2var.get()>0:
        b90_2.invoke()
    if b90_3var.get()>0:
        b90_3.invoke()
    if b90_4var.get()>0:
        b90_4.invoke()
    if b90_5var.get()>0:
        b90_5.invoke()
    if b90_6var.get()>0:
        b90_6.invoke()
    if b90_7var.get()>0:
        b90_7.invoke()
    if b90_8var.get()>0:
        b90_8.invoke()
    if b90_9var.get()>0:
        b90_9.invoke()
    if b90_10var.get()>0:
        b90_10.invoke()
    if b90_11var.get()>0:
        b90_11.invoke()
    if b90_12var.get()>0:
        b90_12.invoke()
    if b90_13var.get()>0:
        b90_13.invoke()
    if b90_14var.get()>0:
        b90_14.invoke()
    if b90_15var.get()>0:
        b90_15.invoke()  
    if b90_17var.get()>0:
        b90_17.invoke()
    if trig_91var.get()>0:
        trig_91.invoke()
       
    if b91_0var.get()>0:
        b91_0.invoke()
    if b91_1var.get()>0:
        b91_1.invoke()
    if b91_2var.get()>0:
        b91_2.invoke()
    if b91_3var.get()>0:
        b91_3.invoke()
    if b91_4var.get()>0:
        b91_4.invoke()
    if b91_5var.get()>0:
        b91_5.invoke()
    if b91_6var.get()>0:
        b91_6.invoke()
    if b91_7var.get()>0:
        b91_7.invoke()
    if b91_8var.get()>0:
        b91_8.invoke()
    if b91_9var.get()>0:
        b91_9.invoke()
    if b91_10var.get()>0:
        b91_10.invoke()
    if b91_11var.get()>0:
        b91_11.invoke()
    if b91_12var.get()>0:
        b91_12.invoke()
    if b91_13var.get()>0:
        b91_13.invoke()
    if b91_14var.get()>0:
        b91_14.invoke()
    if b91_15var.get()>0:
        b91_15.invoke()  
    if b91_17var.get()>0:
        b91_17.invoke()
    if trig_92var.get()>0:
        trig_92.invoke()
       
    if b92_0var.get()>0:
        b92_0.invoke()
    if b92_1var.get()>0:
        b92_1.invoke()
    if b92_2var.get()>0:
        b92_2.invoke()
    if b92_3var.get()>0:
        b92_3.invoke()
    if b92_4var.get()>0:
        b92_4.invoke()
    if b92_5var.get()>0:
        b92_5.invoke()
    if b92_6var.get()>0:
        b92_6.invoke()
    if b92_7var.get()>0:
        b92_7.invoke()
    if b92_8var.get()>0:
        b92_8.invoke()
    if b92_9var.get()>0:
        b92_9.invoke()
    if b92_10var.get()>0:
        b92_10.invoke()
    if b92_11var.get()>0:
        b92_11.invoke()
    if b92_12var.get()>0:
        b92_12.invoke()
    if b92_13var.get()>0:
        b92_13.invoke()
    if b92_14var.get()>0:
        b92_14.invoke()
    if b92_15var.get()>0:
        b92_15.invoke()  
    if b92_17var.get()>0:
        b92_17.invoke()
    if trig_93var.get()>0:
        trig_93.invoke()
       
    if b93_0var.get()>0:
        b93_0.invoke()
    if b93_1var.get()>0:
        b93_1.invoke()
    if b93_2var.get()>0:
        b93_2.invoke()
    if b93_3var.get()>0:
        b93_3.invoke()
    if b93_4var.get()>0:
        b93_4.invoke()
    if b93_5var.get()>0:
        b93_5.invoke()
    if b93_6var.get()>0:
        b93_6.invoke()
    if b93_7var.get()>0:
        b93_7.invoke()
    if b93_8var.get()>0:
        b93_8.invoke()
    if b93_9var.get()>0:
        b93_9.invoke()
    if b93_10var.get()>0:
        b93_10.invoke()
    if b93_11var.get()>0:
        b93_11.invoke()
    if b93_12var.get()>0:
        b93_12.invoke()
    if b93_13var.get()>0:
        b93_13.invoke()
    if b93_14var.get()>0:
        b93_14.invoke()
    if b93_15var.get()>0:
        b93_15.invoke()  
    if b93_17var.get()>0:
        b93_17.invoke()
    if trig_94var.get()>0:
        trig_94.invoke()
       
    if b94_0var.get()>0:
        b94_0.invoke()
    if b94_1var.get()>0:
        b94_1.invoke()
    if b94_2var.get()>0:
        b94_2.invoke()
    if b94_3var.get()>0:
        b94_3.invoke()
    if b94_4var.get()>0:
        b94_4.invoke()
    if b94_5var.get()>0:
        b94_5.invoke()
    if b94_6var.get()>0:
        b94_6.invoke()
    if b94_7var.get()>0:
        b94_7.invoke()
    if b94_8var.get()>0:
        b94_8.invoke()
    if b94_9var.get()>0:
        b94_9.invoke()
    if b94_10var.get()>0:
        b94_10.invoke()
    if b94_11var.get()>0:
        b94_11.invoke()
    if b94_12var.get()>0:
        b94_12.invoke()
    if b94_13var.get()>0:
        b94_13.invoke()
    if b94_14var.get()>0:
        b94_14.invoke()
    if b94_15var.get()>0:
        b94_15.invoke()  
    if b94_17var.get()>0:
        b94_17.invoke()
    if trig_95var.get()>0:
        trig_95.invoke()
       
    if b95_0var.get()>0:
        b95_0.invoke()
    if b95_1var.get()>0:
        b95_1.invoke()
    if b95_2var.get()>0:
        b95_2.invoke()
    if b95_3var.get()>0:
        b95_3.invoke()
    if b95_4var.get()>0:
        b95_4.invoke()
    if b95_5var.get()>0:
        b95_5.invoke()
    if b95_6var.get()>0:
        b95_6.invoke()
    if b95_7var.get()>0:
        b95_7.invoke()
    if b95_8var.get()>0:
        b95_8.invoke()
    if b95_9var.get()>0:
        b95_9.invoke()
    if b95_10var.get()>0:
        b95_10.invoke()
    if b95_11var.get()>0:
        b95_11.invoke()
    if b95_12var.get()>0:
        b95_12.invoke()
    if b95_13var.get()>0:
        b95_13.invoke()
    if b95_14var.get()>0:
        b95_14.invoke()
    if b95_15var.get()>0:
        b95_15.invoke()  
    if b95_17var.get()>0:
        b95_17.invoke()
    if trig_96var.get()>0:
        trig_96.invoke()
       
    if b96_0var.get()>0:
        b96_0.invoke()
    if b96_1var.get()>0:
        b96_1.invoke()
    if b96_2var.get()>0:
        b96_2.invoke()
    if b96_3var.get()>0:
        b96_3.invoke()
    if b96_4var.get()>0:
        b96_4.invoke()
    if b96_5var.get()>0:
        b96_5.invoke()
    if b96_6var.get()>0:
        b96_6.invoke()
    if b96_7var.get()>0:
        b96_7.invoke()
    if b96_8var.get()>0:
        b96_8.invoke()
    if b96_9var.get()>0:
        b96_9.invoke()
    if b96_10var.get()>0:
        b96_10.invoke()
    if b96_11var.get()>0:
        b96_11.invoke()
    if b96_12var.get()>0:
        b96_12.invoke()
    if b96_13var.get()>0:
        b96_13.invoke()
    if b96_14var.get()>0:
        b96_14.invoke()
    if b96_15var.get()>0:
        b96_15.invoke()  
    if b96_17var.get()>0:
        b96_17.invoke()
    if trig_97var.get()>0:
        trig_97.invoke()
       
    if b97_0var.get()>0:
        b97_0.invoke()
    if b97_1var.get()>0:
        b97_1.invoke()
    if b97_2var.get()>0:
        b97_2.invoke()
    if b97_3var.get()>0:
        b97_3.invoke()
    if b97_4var.get()>0:
        b97_4.invoke()
    if b97_5var.get()>0:
        b97_5.invoke()
    if b97_6var.get()>0:
        b97_6.invoke()
    if b97_7var.get()>0:
        b97_7.invoke()
    if b97_8var.get()>0:
        b97_8.invoke()
    if b97_9var.get()>0:
        b97_9.invoke()
    if b97_10var.get()>0:
        b97_10.invoke()
    if b97_11var.get()>0:
        b97_11.invoke()
    if b97_12var.get()>0:
        b97_12.invoke()
    if b97_13var.get()>0:
        b97_13.invoke()
    if b97_14var.get()>0:
        b97_14.invoke()
    if b97_15var.get()>0:
        b97_15.invoke()  
    if b97_17var.get()>0:
        b97_17.invoke()
    if trig_98var.get()>0:
        trig_98.invoke()
       
    if b98_0var.get()>0:
        b98_0.invoke()
    if b98_1var.get()>0:
        b98_1.invoke()
    if b98_2var.get()>0:
        b98_2.invoke()
    if b98_3var.get()>0:
        b98_3.invoke()
    if b98_4var.get()>0:
        b98_4.invoke()
    if b98_5var.get()>0:
        b98_5.invoke()
    if b98_6var.get()>0:
        b98_6.invoke()
    if b98_7var.get()>0:
        b98_7.invoke()
    if b98_8var.get()>0:
        b98_8.invoke()
    if b98_9var.get()>0:
        b98_9.invoke()
    if b98_10var.get()>0:
        b98_10.invoke()
    if b98_11var.get()>0:
        b98_11.invoke()
    if b98_12var.get()>0:
        b98_12.invoke()
    if b98_13var.get()>0:
        b98_13.invoke()
    if b98_14var.get()>0:
        b98_14.invoke()
    if b98_15var.get()>0:
        b98_15.invoke()  
    if b98_17var.get()>0:
        b98_17.invoke()
    if trig_99var.get()>0:
        trig_99.invoke()
       
    if b99_0var.get()>0:
        b99_0.invoke()
    if b99_1var.get()>0:
        b99_1.invoke()
    if b99_2var.get()>0:
        b99_2.invoke()
    if b99_3var.get()>0:
        b99_3.invoke()
    if b99_4var.get()>0:
        b99_4.invoke()
    if b99_5var.get()>0:
        b99_5.invoke()
    if b99_6var.get()>0:
        b99_6.invoke()
    if b99_7var.get()>0:
        b99_7.invoke()
    if b99_8var.get()>0:
        b99_8.invoke()
    if b99_9var.get()>0:
        b99_9.invoke()
    if b99_10var.get()>0:
        b99_10.invoke()
    if b99_11var.get()>0:
        b99_11.invoke()
    if b99_12var.get()>0:
        b99_12.invoke()
    if b99_13var.get()>0:
        b99_13.invoke()
    if b99_14var.get()>0:
        b99_14.invoke()
    if b99_15var.get()>0:
        b99_15.invoke()  
    if b99_17var.get()>0:
        b99_17.invoke()
    if trig_100var.get()>0:
        trig_100.invoke()
       
    if loop_var.get()>0:
        loop_0.invoke()

    speed0=0.5
    show_speed0.set(speed0)
    showspeed0.configure(text=show_speed0.get())
    speed1=0.5
    show_speed1.set(speed1)
    showspeed1.configure(text=show_speed1.get())
    speed2=0.5
    show_speed2.set(speed2)
    showspeed2.configure(text=show_speed2.get())
    speed3=0.5
    show_speed3.set(speed3)
    showspeed3.configure(text=show_speed3.get())
    speed4=0.5
    show_speed4.set(speed4)
    showspeed4.configure(text=show_speed4.get())
    speed5=0.5
    show_speed5.set(speed5)
    showspeed5.configure(text=show_speed5.get())
    speed6=0.5
    show_speed6.set(speed6)
    showspeed6.configure(text=show_speed6.get())
    speed7=0.5
    show_speed7.set(speed7)
    showspeed7.configure(text=show_speed7.get())
    speed8=0.5
    show_speed8.set(speed8)
    showspeed8.configure(text=show_speed8.get())
    speed9=0.5
    show_speed9.set(speed9)
    showspeed9.configure(text=show_speed9.get())
    speed10=0.5
    show_speed10.set(speed10)
    showspeed10.configure(text=show_speed10.get())
    speed11=0.5
    show_speed11.set(speed11)
    showspeed11.configure(text=show_speed11.get())
    speed12=0.5
    show_speed12.set(speed12)
    showspeed12.configure(text=show_speed12.get())
    speed13=0.5
    show_speed13.set(speed13)
    showspeed13.configure(text=show_speed13.get())
    speed14=0.5
    show_speed14.set(speed14)
    showspeed14.configure(text=show_speed14.get())
    speed15=0.5
    show_speed15.set(speed15)
    showspeed15.configure(text=show_speed15.get())
    speed16=0.5
    show_speed16.set(speed16)
    showspeed16.configure(text=show_speed16.get())
    speed17=0.5
    show_speed17.set(speed17)
    showspeed17.configure(text=show_speed17.get())
    speed18=0.5
    show_speed18.set(speed18)
    showspeed18.configure(text=show_speed18.get())
    speed19=0.5
    show_speed19.set(speed19)
    showspeed19.configure(text=show_speed19.get())
    speed20=0.5
    show_speed20.set(speed20)
    showspeed20.configure(text=show_speed20.get())
    speed21=0.5
    show_speed21.set(speed21)
    showspeed21.configure(text=show_speed21.get())
    speed22=0.5
    show_speed22.set(speed22)
    showspeed22.configure(text=show_speed22.get())
    speed23=0.5
    show_speed23.set(speed23)
    showspeed23.configure(text=show_speed23.get())
    speed24=0.5
    show_speed24.set(speed24)
    showspeed24.configure(text=show_speed24.get())
    speed25=0.5
    show_speed25.set(speed25)
    showspeed25.configure(text=show_speed25.get())
    speed26=0.5
    show_speed26.set(speed26)
    showspeed26.configure(text=show_speed26.get())
    speed27=0.5
    show_speed27.set(speed27)
    showspeed27.configure(text=show_speed27.get())
    speed28=0.5
    show_speed28.set(speed28)
    showspeed28.configure(text=show_speed28.get())
    speed29=0.5
    show_speed29.set(speed29)
    showspeed29.configure(text=show_speed29.get())
    speed30=0.5
    show_speed30.set(speed30)
    showspeed30.configure(text=show_speed30.get())
    speed31=0.5
    show_speed31.set(speed31)
    showspeed31.configure(text=show_speed31.get())
    speed32=0.5
    show_speed32.set(speed32)
    showspeed32.configure(text=show_speed32.get())
    speed33=0.5
    show_speed33.set(speed33)
    showspeed33.configure(text=show_speed33.get())
    speed34=0.5
    show_speed34.set(speed34)
    showspeed34.configure(text=show_speed34.get())
    speed35=0.5
    show_speed35.set(speed35)
    showspeed35.configure(text=show_speed35.get())
    speed36=0.5
    show_speed36.set(speed36)
    showspeed36.configure(text=show_speed36.get())
    speed37=0.5
    show_speed37.set(speed37)
    showspeed37.configure(text=show_speed37.get())
    speed38=0.5
    show_speed38.set(speed38)
    showspeed38.configure(text=show_speed38.get())
    speed39=0.5
    show_speed39.set(speed39)
    showspeed39.configure(text=show_speed39.get())
    speed40=0.5
    show_speed40.set(speed40)
    showspeed40.configure(text=show_speed40.get())
    speed41=0.5
    show_speed41.set(speed41)
    showspeed41.configure(text=show_speed41.get())
    speed42=0.5
    show_speed42.set(speed42)
    showspeed42.configure(text=show_speed42.get())
    speed43=0.5
    show_speed43.set(speed43)
    showspeed43.configure(text=show_speed43.get())
    speed44=0.5
    show_speed44.set(speed44)
    showspeed44.configure(text=show_speed44.get())
    speed45=0.5
    show_speed45.set(speed45)
    showspeed45.configure(text=show_speed45.get())
    speed46=0.5
    show_speed46.set(speed46)
    showspeed46.configure(text=show_speed46.get())
    speed47=0.5
    show_speed47.set(speed47)
    showspeed47.configure(text=show_speed47.get())
    speed48=0.5
    show_speed48.set(speed48)
    showspeed48.configure(text=show_speed48.get())
    speed49=0.5
    show_speed49.set(speed49)
    showspeed49.configure(text=show_speed49.get())
    speed50=0.5
    show_speed50.set(speed50)
    showspeed50.configure(text=show_speed50.get())
    speed51=0.5
    show_speed51.set(speed51)
    showspeed51.configure(text=show_speed51.get())
    speed52=0.5
    show_speed52.set(speed52)
    showspeed52.configure(text=show_speed52.get())
    speed53=0.5
    show_speed53.set(speed53)
    showspeed53.configure(text=show_speed53.get())
    speed54=0.5
    show_speed54.set(speed54)
    showspeed54.configure(text=show_speed54.get())
    speed55=0.5
    show_speed55.set(speed55)
    showspeed55.configure(text=show_speed55.get())
    speed56=0.5
    show_speed56.set(speed56)
    showspeed56.configure(text=show_speed56.get())
    speed57=0.5
    show_speed57.set(speed57)
    showspeed57.configure(text=show_speed57.get())
    speed58=0.5
    show_speed58.set(speed58)
    showspeed58.configure(text=show_speed58.get())
    speed59=0.5
    show_speed59.set(speed59)
    showspeed59.configure(text=show_speed59.get())
    speed60=0.5
    show_speed60.set(speed60)
    showspeed60.configure(text=show_speed60.get())
    speed61=0.5
    show_speed61.set(speed61)
    showspeed61.configure(text=show_speed61.get())
    speed62=0.5
    show_speed62.set(speed62)
    showspeed62.configure(text=show_speed62.get())
    speed63=0.5
    show_speed63.set(speed63)
    showspeed63.configure(text=show_speed63.get())
    speed64=0.5
    show_speed64.set(speed64)
    showspeed64.configure(text=show_speed64.get())
    speed65=0.5
    show_speed65.set(speed65)
    showspeed65.configure(text=show_speed65.get())
    speed66=0.5
    show_speed66.set(speed66)
    showspeed66.configure(text=show_speed66.get())
    speed67=0.5
    show_speed67.set(speed67)
    showspeed67.configure(text=show_speed67.get())
    speed68=0.5
    show_speed68.set(speed68)
    showspeed68.configure(text=show_speed68.get())
    speed69=0.5
    show_speed69.set(speed69)
    showspeed69.configure(text=show_speed69.get())
    speed70=0.5
    show_speed70.set(speed70)
    showspeed70.configure(text=show_speed70.get())
    speed71=0.5
    show_speed71.set(speed71)
    showspeed71.configure(text=show_speed71.get())
    speed72=0.5
    show_speed72.set(speed72)
    showspeed72.configure(text=show_speed72.get())
    speed73=0.5
    show_speed73.set(speed73)
    showspeed73.configure(text=show_speed73.get())
    speed74=0.5
    show_speed74.set(speed74)
    showspeed74.configure(text=show_speed74.get())
    speed75=0.5
    show_speed75.set(speed75)
    showspeed75.configure(text=show_speed75.get())
    speed76=0.5
    show_speed76.set(speed76)
    showspeed76.configure(text=show_speed76.get())
    speed77=0.5
    show_speed77.set(speed77)
    showspeed77.configure(text=show_speed77.get())
    speed78=0.5
    show_speed78.set(speed78)
    showspeed78.configure(text=show_speed78.get())
    speed79=0.5
    show_speed79.set(speed79)
    showspeed79.configure(text=show_speed79.get())
    speed80=0.5
    show_speed80.set(speed80)
    showspeed80.configure(text=show_speed80.get())
    speed81=0.5
    show_speed81.set(speed81)
    showspeed81.configure(text=show_speed81.get())
    speed82=0.5
    show_speed82.set(speed82)
    showspeed82.configure(text=show_speed82.get())
    speed83=0.5
    show_speed83.set(speed83)
    showspeed83.configure(text=show_speed83.get())
    speed84=0.5
    show_speed84.set(speed84)
    showspeed84.configure(text=show_speed84.get())
    speed85=0.5
    show_speed85.set(speed85)
    showspeed85.configure(text=show_speed85.get())
    speed86=0.5
    show_speed86.set(speed86)
    showspeed86.configure(text=show_speed86.get())
    speed87=0.5
    show_speed87.set(speed87)
    showspeed87.configure(text=show_speed87.get())
    speed88=0.5
    show_speed88.set(speed88)
    showspeed88.configure(text=show_speed88.get())
    speed89=0.5
    show_speed89.set(speed89)
    showspeed89.configure(text=show_speed89.get())
    speed90=0.5
    show_speed90.set(speed90)
    showspeed90.configure(text=show_speed90.get())
    speed91=0.5
    show_speed91.set(speed91)
    showspeed91.configure(text=show_speed91.get())
    speed92=0.5
    show_speed92.set(speed92)
    showspeed92.configure(text=show_speed92.get())
    speed93=0.5
    show_speed93.set(speed93)
    showspeed93.configure(text=show_speed93.get())
    speed94=0.5
    show_speed94.set(speed94)
    showspeed94.configure(text=show_speed94.get())
    speed95=0.5
    show_speed95.set(speed95)
    showspeed95.configure(text=show_speed95.get())
    speed96=0.5
    show_speed96.set(speed96)
    showspeed96.configure(text=show_speed96.get())
    speed97=0.5
    show_speed97.set(speed97)
    showspeed97.configure(text=show_speed97.get())
    speed98=0.5
    show_speed98.set(speed98)
    showspeed98.configure(text=show_speed98.get())
    speed99=0.5
    show_speed99.set(speed95)
    showspeed99.configure(text=show_speed99.get())
    
    repeat=0.5
    show_repeat.set(repeat)
    showrepeat.configure(text=show_repeat.get())
    loop=1
    show_loop.set(loop)
    showloop.configure(text=show_loop.get())
    

# Load data
def file_open():
    f = tkFileDialog.askopenfile(mode='r', defaultextension=".trg", filetypes=[('Trigger Files', '.trg'), ('Text Files', '.txt'), ('All Files', '.*')])
    if f is None:
        return
    if f != None:
        data = f.read()
        f.close()
        
    global speed0, speed1, speed2, speed3, speed4, speed5, speed6, speed7, speed8, speed9, speed10, speed11, speed12, speed13, speed14, speed15, speed16, \
           speed17, speed18, speed19, speed20, speed21, speed22, speed23, speed24, speed25, speed26, speed27, speed28, speed29, speed30, speed31, speed32, speed33, \
           speed34, speed35, speed36, speed37, speed38, speed39, speed40, speed41, speed42, speed43, speed44, speed45, speed46, speed47, speed48, speed49, speed50, \
           speed51, speed52, speed53, speed54, speed55, speed56, speed57, speed58, speed59, speed60, speed61, speed62, speed63, speed64, speed65, speed66, speed67, \
           speed68, speed69, speed70, speed71, speed72, speed73, speed74, speed75, speed76, speed77, speed78, speed79, speed80, speed81, speed82, speed83, speed84, \
           speed85, speed86, speed87, speed88, speed89, speed90, speed91, speed92, speed93, speed94, speed95, speed96, speed97, speed98, speed99, repeat, loop
    output = data.split()
    for bits in output:
        c0_0=output[0]
        c0_1=output[1]
        c0_2=output[2]
        c0_3=output[3]
        c0_4=output[4]
        c0_5=output[5]
        c0_6=output[6]
        c0_7=output[7]
        c0_8=output[8]
        c0_9=output[9]
        c0_10=output[10]
        c0_11=output[11]
        c0_12=output[12]
        c0_13=output[13]
        c0_14=output[14]
        c0_15=output[15]
        c0_16=output[16]
        c0_17=output[17]
        tr_1=output[18]
        c1_0=output[19]
        c1_1=output[20]
        c1_2=output[21]
        c1_3=output[22]
        c1_4=output[23]
        c1_5=output[24]
        c1_6=output[25]
        c1_7=output[26]
        c1_8=output[27]
        c1_9=output[28]
        c1_10=output[29]
        c1_11=output[30]
        c1_12=output[31]
        c1_13=output[32]
        c1_14=output[33]
        c1_15=output[34]
        c1_17=output[35]
        tr_2=output[36]
        c2_0=output[37]
        c2_1=output[38]
        c2_2=output[39]
        c2_3=output[40]
        c2_4=output[41]
        c2_5=output[42]
        c2_6=output[43]
        c2_7=output[44]
        c2_8=output[45]
        c2_9=output[46]
        c2_10=output[47]
        c2_11=output[48]
        c2_12=output[49]
        c2_13=output[50]
        c2_14=output[51]
        c2_15=output[52]
        c2_17=output[53]
        tr_3=output[54]
        c3_0=output[55]
        c3_1=output[56]
        c3_2=output[57]
        c3_3=output[58]
        c3_4=output[59]
        c3_5=output[60]
        c3_6=output[61]
        c3_7=output[62]
        c3_8=output[63]
        c3_9=output[64]
        c3_10=output[65]
        c3_11=output[66]
        c3_12=output[67]
        c3_13=output[68]
        c3_14=output[69]
        c3_15=output[70]        
        c3_17=output[71]
        tr_4=output[72]
        c4_0=output[73]
        c4_1=output[74]
        c4_2=output[75]
        c4_3=output[76]
        c4_4=output[77]
        c4_5=output[78]
        c4_6=output[79]
        c4_7=output[80]
        c4_8=output[81]
        c4_9=output[82]
        c4_10=output[83]
        c4_11=output[84]
        c4_12=output[85]
        c4_13=output[86]
        c4_14=output[87]
        c4_15=output[88]
        c4_17=output[89]
        tr_5=output[90]
        c5_0=output[91]
        c5_1=output[92]
        c5_2=output[93]
        c5_3=output[94]
        c5_4=output[95]
        c5_5=output[96]
        c5_6=output[97]
        c5_7=output[98]
        c5_8=output[99]
        c5_9=output[100]
        c5_10=output[101]
        c5_11=output[102]
        c5_12=output[103]
        c5_13=output[104]
        c5_14=output[105]
        c5_15=output[106]        
        c5_17=output[107]
        tr_6=output[108]
        c6_0=output[109]
        c6_1=output[110]
        c6_2=output[111]
        c6_3=output[112]
        c6_4=output[113]
        c6_5=output[114]
        c6_6=output[115]
        c6_7=output[116]
        c6_8=output[117]
        c6_9=output[118]
        c6_10=output[119]
        c6_11=output[120]
        c6_12=output[121]
        c6_13=output[122]
        c6_14=output[123]
        c6_15=output[124]
        c6_17=output[125]
        tr_7=output[126]
        c7_0=output[127]
        c7_1=output[128]
        c7_2=output[129]
        c7_3=output[130]
        c7_4=output[131]
        c7_5=output[132]
        c7_6=output[133]
        c7_7=output[134]
        c7_8=output[135]
        c7_9=output[136]
        c7_10=output[137]
        c7_11=output[138]
        c7_12=output[139]
        c7_13=output[140]
        c7_14=output[141]
        c7_15=output[142]
        c7_17=output[143]
        tr_8=output[144]
        c8_0=output[145]
        c8_1=output[146]
        c8_2=output[147]
        c8_3=output[148]
        c8_4=output[149]
        c8_5=output[150]
        c8_6=output[151]
        c8_7=output[152]
        c8_8=output[153]
        c8_9=output[154]
        c8_10=output[155]
        c8_11=output[156]
        c8_12=output[157]
        c8_13=output[158]
        c8_14=output[159]
        c8_15=output[160]
        c8_17=output[161]
        tr_9=output[162]
        c9_0=output[163]
        c9_1=output[164]
        c9_2=output[165]
        c9_3=output[166]
        c9_4=output[167]
        c9_5=output[168]
        c9_6=output[169]
        c9_7=output[170]
        c9_8=output[171]
        c9_9=output[172]
        c9_10=output[173]
        c9_11=output[174]
        c9_12=output[175]
        c9_13=output[176]
        c9_14=output[177]
        c9_15=output[178]
        c9_17=output[179]
        tr_10=output[180]
        c10_0=output[181]
        c10_1=output[182]
        c10_2=output[183]
        c10_3=output[184]
        c10_4=output[185]
        c10_5=output[186]
        c10_6=output[187]
        c10_7=output[188]
        c10_8=output[189]
        c10_9=output[190]
        c10_10=output[191]
        c10_11=output[192]
        c10_12=output[193]
        c10_13=output[194]
        c10_14=output[195]
        c10_15=output[196]
        c10_17=output[197]
        tr_11=output[198]
        c11_0=output[199]
        c11_1=output[200]
        c11_2=output[201]
        c11_3=output[202]
        c11_4=output[203]
        c11_5=output[204]
        c11_6=output[205]
        c11_7=output[206]
        c11_8=output[207]
        c11_9=output[208]
        c11_10=output[209]
        c11_11=output[210]
        c11_12=output[211]
        c11_13=output[212]
        c11_14=output[213]
        c11_15=output[214]
        c11_17=output[215]
        tr_12=output[216]
        c12_0=output[217]
        c12_1=output[218]
        c12_2=output[219]
        c12_3=output[220]
        c12_4=output[221]
        c12_5=output[222]
        c12_6=output[223]
        c12_7=output[224]
        c12_8=output[225]
        c12_9=output[226]
        c12_10=output[227]
        c12_11=output[228]
        c12_12=output[229]
        c12_13=output[230]
        c12_14=output[231]
        c12_15=output[232]
        c12_17=output[233]
        tr_13=output[234]
        c13_0=output[235]
        c13_1=output[236]
        c13_2=output[237]
        c13_3=output[238]
        c13_4=output[239]
        c13_5=output[240]
        c13_6=output[241]
        c13_7=output[242]
        c13_8=output[243]
        c13_9=output[244]
        c13_10=output[245]
        c13_11=output[246]
        c13_12=output[247]
        c13_13=output[248]
        c13_14=output[249]
        c13_15=output[250]
        c13_17=output[251]
        tr_14=output[252]
        c14_0=output[253]
        c14_1=output[254]
        c14_2=output[255]
        c14_3=output[256]
        c14_4=output[257]
        c14_5=output[258]
        c14_6=output[259]
        c14_7=output[260]
        c14_8=output[261]
        c14_9=output[262]
        c14_10=output[263]
        c14_11=output[264]
        c14_12=output[265]
        c14_13=output[266]
        c14_14=output[267]
        c14_15=output[268]
        c14_17=output[269]
        tr_15=output[270]
        c15_0=output[271]
        c15_1=output[272]
        c15_2=output[273]
        c15_3=output[274]
        c15_4=output[275]
        c15_5=output[276]
        c15_6=output[277]
        c15_7=output[278]
        c15_8=output[279]
        c15_9=output[280]
        c15_10=output[281]
        c15_11=output[282]
        c15_12=output[283]
        c15_13=output[284]
        c15_14=output[285]
        c15_15=output[286]
        c15_17=output[287]
        tr_16=output[288]
        c16_0=output[289]
        c16_1=output[290]
        c16_2=output[291]
        c16_3=output[292]
        c16_4=output[293]
        c16_5=output[294]
        c16_6=output[295]
        c16_7=output[296]
        c16_8=output[297]
        c16_9=output[298]
        c16_10=output[299]
        c16_11=output[300]
        c16_12=output[301]
        c16_13=output[302]
        c16_14=output[303]
        c16_15=output[304]
        c16_17=output[305]
        tr_17=output[306]
        c17_0=output[307]
        c17_1=output[308]
        c17_2=output[309]
        c17_3=output[310]
        c17_4=output[311]
        c17_5=output[312]
        c17_6=output[313]
        c17_7=output[314]
        c17_8=output[315]
        c17_9=output[316]
        c17_10=output[317]
        c17_11=output[318]
        c17_12=output[319]
        c17_13=output[320]
        c17_14=output[321]
        c17_15=output[322]
        c17_17=output[323]
        tr_18=output[324]
        c18_0=output[325]
        c18_1=output[326]
        c18_2=output[327]
        c18_3=output[328]
        c18_4=output[329]
        c18_5=output[330]
        c18_6=output[331]
        c18_7=output[332]
        c18_8=output[333]
        c18_9=output[334]
        c18_10=output[335]
        c18_11=output[336]
        c18_12=output[337]
        c18_13=output[338]
        c18_14=output[339]
        c18_15=output[340]
        c18_17=output[341]
        tr_19=output[342]
        c19_0=output[343]
        c19_1=output[344]
        c19_2=output[345]
        c19_3=output[346]
        c19_4=output[347]
        c19_5=output[348]
        c19_6=output[349]
        c19_7=output[350]
        c19_8=output[351]
        c19_9=output[352]
        c19_10=output[353]
        c19_11=output[354]
        c19_12=output[355]
        c19_13=output[356]
        c19_14=output[357]
        c19_15=output[358]
        c19_17=output[359]
        tr_20=output[360]
        c20_0=output[361]
        c20_1=output[362]
        c20_2=output[363]
        c20_3=output[364]
        c20_4=output[365]
        c20_5=output[366]
        c20_6=output[367]
        c20_7=output[368]
        c20_8=output[369]
        c20_9=output[370]
        c20_10=output[371]
        c20_11=output[372]
        c20_12=output[373]
        c20_13=output[374]
        c20_14=output[375]
        c20_15=output[376]
        c20_17=output[377]
        tr_21=output[378]
        c21_0=output[379]
        c21_1=output[380]
        c21_2=output[381]
        c21_3=output[382]
        c21_4=output[383]
        c21_5=output[384]
        c21_6=output[385]
        c21_7=output[386]
        c21_8=output[387]
        c21_9=output[388]
        c21_10=output[389]
        c21_11=output[390]
        c21_12=output[391]
        c21_13=output[392]
        c21_14=output[393]
        c21_15=output[394]
        c21_17=output[395]
        tr_22=output[396]
        c22_0=output[397]
        c22_1=output[398]
        c22_2=output[399]
        c22_3=output[400]
        c22_4=output[401]
        c22_5=output[402]
        c22_6=output[403]
        c22_7=output[404]
        c22_8=output[405]
        c22_9=output[406]
        c22_10=output[407]
        c22_11=output[408]
        c22_12=output[409]
        c22_13=output[410]
        c22_14=output[411]
        c22_15=output[412]
        c22_17=output[413]
        tr_23=output[414]
        c23_0=output[415]
        c23_1=output[416]
        c23_2=output[417]
        c23_3=output[418]
        c23_4=output[419]
        c23_5=output[420]
        c23_6=output[421]
        c23_7=output[422]
        c23_8=output[423]
        c23_9=output[424]
        c23_10=output[425]
        c23_11=output[426]
        c23_12=output[427]
        c23_13=output[428]
        c23_14=output[429]
        c23_15=output[430]
        c23_17=output[431]
        tr_24=output[432]
        c24_0=output[433]
        c24_1=output[434]
        c24_2=output[435]
        c24_3=output[436]
        c24_4=output[437]
        c24_5=output[438]
        c24_6=output[439]
        c24_7=output[440]
        c24_8=output[441]
        c24_9=output[442]
        c24_10=output[443]
        c24_11=output[444]
        c24_12=output[445]
        c24_13=output[446]
        c24_14=output[447]
        c24_15=output[448]
        c24_17=output[449]
        tr_25=output[450]
        c25_0=output[451]
        c25_1=output[452]
        c25_2=output[453]
        c25_3=output[454]
        c25_4=output[455]
        c25_5=output[456]
        c25_6=output[457]
        c25_7=output[458]
        c25_8=output[459]
        c25_9=output[460]
        c25_10=output[461]
        c25_11=output[462]
        c25_12=output[463]
        c25_13=output[464]
        c25_14=output[465]
        c25_15=output[466]
        c25_17=output[467]
        tr_26=output[468]
        c26_0=output[469]
        c26_1=output[470]
        c26_2=output[471]
        c26_3=output[472]
        c26_4=output[473]
        c26_5=output[474]
        c26_6=output[475]
        c26_7=output[476]
        c26_8=output[477]
        c26_9=output[478]
        c26_10=output[479]
        c26_11=output[480]
        c26_12=output[481]
        c26_13=output[482]
        c26_14=output[483]
        c26_15=output[484]
        c26_17=output[485]
        tr_27=output[486]
        c27_0=output[487]
        c27_1=output[488]
        c27_2=output[489]
        c27_3=output[490]
        c27_4=output[491]
        c27_5=output[492]
        c27_6=output[493]
        c27_7=output[494]
        c27_8=output[495]
        c27_9=output[496]
        c27_10=output[497]
        c27_11=output[498]
        c27_12=output[499]
        c27_13=output[500]
        c27_14=output[501]
        c27_15=output[502]
        c27_17=output[503]
        tr_28=output[504]
        c28_0=output[505]
        c28_1=output[506]
        c28_2=output[507]
        c28_3=output[508]
        c28_4=output[509]
        c28_5=output[510]
        c28_6=output[511]
        c28_7=output[512]
        c28_8=output[513]
        c28_9=output[514]
        c28_10=output[515]
        c28_11=output[516]
        c28_12=output[517]
        c28_13=output[518]
        c28_14=output[519]
        c28_15=output[520]
        c28_17=output[521]
        tr_29=output[522]
        c29_0=output[523]
        c29_1=output[524]
        c29_2=output[525]
        c29_3=output[526]
        c29_4=output[527]
        c29_5=output[528]
        c29_6=output[529]
        c29_7=output[530]
        c29_8=output[531]
        c29_9=output[532]
        c29_10=output[533]
        c29_11=output[534]
        c29_12=output[535]
        c29_13=output[536]
        c29_14=output[537]
        c29_15=output[538]
        c29_17=output[539]
        tr_30=output[540]
        c30_0=output[541]
        c30_1=output[542]
        c30_2=output[543]
        c30_3=output[544]
        c30_4=output[545]
        c30_5=output[546]
        c30_6=output[547]
        c30_7=output[548]
        c30_8=output[549]
        c30_9=output[550]
        c30_10=output[551]
        c30_11=output[552]
        c30_12=output[553]
        c30_13=output[554]
        c30_14=output[555]
        c30_15=output[556]
        c30_17=output[557]
        tr_31=output[558]
        c31_0=output[559]
        c31_1=output[560]
        c31_2=output[561]
        c31_3=output[562]
        c31_4=output[563]
        c31_5=output[564]
        c31_6=output[565]
        c31_7=output[566]
        c31_8=output[567]
        c31_9=output[568]
        c31_10=output[569]
        c31_11=output[570]
        c31_12=output[571]
        c31_13=output[572]
        c31_14=output[573]
        c31_15=output[574]
        c31_17=output[575]
        tr_32=output[576]
        c32_0=output[577]
        c32_1=output[578]
        c32_2=output[579]
        c32_3=output[580]
        c32_4=output[581]
        c32_5=output[582]
        c32_6=output[583]
        c32_7=output[584]
        c32_8=output[585]
        c32_9=output[586]
        c32_10=output[587]
        c32_11=output[588]
        c32_12=output[589]
        c32_13=output[590]
        c32_14=output[591]
        c32_15=output[592]
        c32_17=output[593]
        tr_33=output[594]
        c33_0=output[595]
        c33_1=output[596]
        c33_2=output[597]
        c33_3=output[598]
        c33_4=output[599]
        c33_5=output[600]
        c33_6=output[601]
        c33_7=output[602]
        c33_8=output[603]
        c33_9=output[604]
        c33_10=output[605]
        c33_11=output[606]
        c33_12=output[607]
        c33_13=output[608]
        c33_14=output[609]
        c33_15=output[610]
        c33_17=output[611]
        tr_34=output[612]
        c34_0=output[613]
        c34_1=output[614]
        c34_2=output[615]
        c34_3=output[616]
        c34_4=output[617]
        c34_5=output[618]
        c34_6=output[619]
        c34_7=output[620]
        c34_8=output[621]
        c34_9=output[622]
        c34_10=output[623]
        c34_11=output[624]
        c34_12=output[625]
        c34_13=output[626]
        c34_14=output[627]
        c34_15=output[628]
        c34_17=output[629]
        tr_35=output[630]
        c35_0=output[631]
        c35_1=output[632]
        c35_2=output[633]
        c35_3=output[634]
        c35_4=output[635]
        c35_5=output[636]
        c35_6=output[637]
        c35_7=output[638]
        c35_8=output[639]
        c35_9=output[640]
        c35_10=output[641]
        c35_11=output[642]
        c35_12=output[643]
        c35_13=output[644]
        c35_14=output[645]
        c35_15=output[646]
        c35_17=output[647]
        tr_36=output[648]
        c36_0=output[649]
        c36_1=output[650]
        c36_2=output[651]
        c36_3=output[652]
        c36_4=output[653]
        c36_5=output[654]
        c36_6=output[655]
        c36_7=output[656]
        c36_8=output[657]
        c36_9=output[658]
        c36_10=output[659]
        c36_11=output[660]
        c36_12=output[661]
        c36_13=output[662]
        c36_14=output[663]
        c36_15=output[664]
        c36_17=output[665]
        tr_37=output[666]
        c37_0=output[667]
        c37_1=output[668]
        c37_2=output[669]
        c37_3=output[670]
        c37_4=output[671]
        c37_5=output[672]
        c37_6=output[673]
        c37_7=output[674]
        c37_8=output[675]
        c37_9=output[676]
        c37_10=output[677]
        c37_11=output[678]
        c37_12=output[679]
        c37_13=output[680]
        c37_14=output[681]
        c37_15=output[682]
        c37_17=output[683]
        tr_38=output[684]
        c38_0=output[685]
        c38_1=output[686]
        c38_2=output[687]
        c38_3=output[688]
        c38_4=output[689]
        c38_5=output[690]
        c38_6=output[691]
        c38_7=output[692]
        c38_8=output[693]
        c38_9=output[694]
        c38_10=output[695]
        c38_11=output[696]
        c38_12=output[697]
        c38_13=output[698]
        c38_14=output[699]
        c38_15=output[700]
        c38_17=output[701]
        tr_39=output[702]
        c39_0=output[703]
        c39_1=output[704]
        c39_2=output[705]
        c39_3=output[706]
        c39_4=output[707]
        c39_5=output[708]
        c39_6=output[709]
        c39_7=output[710]
        c39_8=output[711]
        c39_9=output[712]
        c39_10=output[713]
        c39_11=output[714]
        c39_12=output[715]
        c39_13=output[716]
        c39_14=output[717]
        c39_15=output[718]
        c39_17=output[719]
        tr_40=output[720]
        c40_0=output[721]
        c40_1=output[722]
        c40_2=output[723]
        c40_3=output[724]
        c40_4=output[725]
        c40_5=output[726]
        c40_6=output[727]
        c40_7=output[728]
        c40_8=output[729]
        c40_9=output[730]
        c40_10=output[731]
        c40_11=output[732]
        c40_12=output[733]
        c40_13=output[734]
        c40_14=output[735]
        c40_15=output[736]
        c40_17=output[737]
        tr_41=output[738]
        c41_0=output[739]
        c41_1=output[740]
        c41_2=output[741]
        c41_3=output[742]
        c41_4=output[743]
        c41_5=output[744]
        c41_6=output[745]
        c41_7=output[746]
        c41_8=output[747]
        c41_9=output[748]
        c41_10=output[749]
        c41_11=output[750]
        c41_12=output[751]
        c41_13=output[752]
        c41_14=output[753]
        c41_15=output[754]
        c41_17=output[755]
        tr_42=output[756]
        c42_0=output[757]
        c42_1=output[758]
        c42_2=output[759]
        c42_3=output[760]
        c42_4=output[761]
        c42_5=output[762]
        c42_6=output[763]
        c42_7=output[764]
        c42_8=output[765]
        c42_9=output[766]
        c42_10=output[767]
        c42_11=output[768]
        c42_12=output[769]
        c42_13=output[770]
        c42_14=output[771]
        c42_15=output[772]
        c42_17=output[773]
        tr_43=output[774]
        c43_0=output[775]
        c43_1=output[776]
        c43_2=output[777]
        c43_3=output[778]
        c43_4=output[779]
        c43_5=output[780]
        c43_6=output[781]
        c43_7=output[782]
        c43_8=output[783]
        c43_9=output[784]
        c43_10=output[785]
        c43_11=output[786]
        c43_12=output[787]
        c43_13=output[788]
        c43_14=output[789]
        c43_15=output[790]
        c43_17=output[791]
        tr_44=output[792]
        c44_0=output[793]
        c44_1=output[794]
        c44_2=output[795]
        c44_3=output[796]
        c44_4=output[797]
        c44_5=output[798]
        c44_6=output[799]
        c44_7=output[800]
        c44_8=output[801]
        c44_9=output[802]
        c44_10=output[803]
        c44_11=output[804]
        c44_12=output[805]
        c44_13=output[806]
        c44_14=output[807]
        c44_15=output[808]
        c44_17=output[809]
        tr_45=output[810]
        c45_0=output[811]
        c45_1=output[812]
        c45_2=output[813]
        c45_3=output[814]
        c45_4=output[815]
        c45_5=output[816]
        c45_6=output[817]
        c45_7=output[818]
        c45_8=output[819]
        c45_9=output[820]
        c45_10=output[821]
        c45_11=output[822]
        c45_12=output[823]
        c45_13=output[824]
        c45_14=output[825]
        c45_15=output[826]
        c45_17=output[827]
        tr_46=output[828]
        c46_0=output[829]
        c46_1=output[830]
        c46_2=output[831]
        c46_3=output[832]
        c46_4=output[833]
        c46_5=output[834]
        c46_6=output[835]
        c46_7=output[836]
        c46_8=output[837]
        c46_9=output[838]
        c46_10=output[839]
        c46_11=output[840]
        c46_12=output[841]
        c46_13=output[842]
        c46_14=output[843]
        c46_15=output[844]
        c46_17=output[845]
        tr_47=output[846]
        c47_0=output[847]
        c47_1=output[848]
        c47_2=output[849]
        c47_3=output[850]
        c47_4=output[851]
        c47_5=output[852]
        c47_6=output[853]
        c47_7=output[854]
        c47_8=output[855]
        c47_9=output[856]
        c47_10=output[857]
        c47_11=output[858]
        c47_12=output[859]
        c47_13=output[860]
        c47_14=output[861]
        c47_15=output[862]
        c47_17=output[863]
        tr_48=output[864]
        c48_0=output[865]
        c48_1=output[866]
        c48_2=output[867]
        c48_3=output[868]
        c48_4=output[869]
        c48_5=output[870]
        c48_6=output[871]
        c48_7=output[872]
        c48_8=output[873]
        c48_9=output[874]
        c48_10=output[875]
        c48_11=output[876]
        c48_12=output[877]
        c48_13=output[878]
        c48_14=output[879]
        c48_15=output[880]
        c48_17=output[881]
        tr_49=output[882]
        c49_0=output[883]
        c49_1=output[884]
        c49_2=output[885]
        c49_3=output[886]
        c49_4=output[887]
        c49_5=output[888]
        c49_6=output[889]
        c49_7=output[890]
        c49_8=output[891]
        c49_9=output[892]
        c49_10=output[893]
        c49_11=output[894]
        c49_12=output[895]
        c49_13=output[896]
        c49_14=output[897]
        c49_15=output[898]
        c49_17=output[899]
        tr_50=output[900]
        c50_0=output[901]
        c50_1=output[902]
        c50_2=output[903]
        c50_3=output[904]
        c50_4=output[905]
        c50_5=output[906]
        c50_6=output[907]
        c50_7=output[908]
        c50_8=output[909]
        c50_9=output[910]
        c50_10=output[911]
        c50_11=output[912]
        c50_12=output[913]
        c50_13=output[914]
        c50_14=output[915]
        c50_15=output[916]
        c50_17=output[917]
        tr_51=output[918]
        c51_0=output[919]
        c51_1=output[920]
        c51_2=output[921]
        c51_3=output[922]
        c51_4=output[923]
        c51_5=output[924]
        c51_6=output[925]
        c51_7=output[926]
        c51_8=output[927]
        c51_9=output[928]
        c51_10=output[929]
        c51_11=output[930]
        c51_12=output[931]
        c51_13=output[932]
        c51_14=output[933]
        c51_15=output[934]
        c51_17=output[935]
        tr_52=output[936]
        c52_0=output[937]
        c52_1=output[938]
        c52_2=output[939]
        c52_3=output[940]
        c52_4=output[941]
        c52_5=output[942]
        c52_6=output[943]
        c52_7=output[944]
        c52_8=output[945]
        c52_9=output[946]
        c52_10=output[947]
        c52_11=output[948]
        c52_12=output[949]
        c52_13=output[950]
        c52_14=output[951]
        c52_15=output[952]
        c52_17=output[953]
        tr_53=output[954]
        c53_0=output[955]
        c53_1=output[956]
        c53_2=output[957]
        c53_3=output[958]
        c53_4=output[959]
        c53_5=output[960]
        c53_6=output[961]
        c53_7=output[962]
        c53_8=output[963]
        c53_9=output[964]
        c53_10=output[965]
        c53_11=output[966]
        c53_12=output[967]
        c53_13=output[968]
        c53_14=output[969]
        c53_15=output[970]
        c53_17=output[971]
        tr_54=output[972]
        c54_0=output[973]
        c54_1=output[974]
        c54_2=output[975]
        c54_3=output[976]
        c54_4=output[977]
        c54_5=output[978]
        c54_6=output[979]
        c54_7=output[980]
        c54_8=output[981]
        c54_9=output[982]
        c54_10=output[983]
        c54_11=output[984]
        c54_12=output[985]
        c54_13=output[986]
        c54_14=output[987]
        c54_15=output[988]
        c54_17=output[989]
        tr_55=output[990]
        c55_0=output[991]
        c55_1=output[992]
        c55_2=output[993]
        c55_3=output[994]
        c55_4=output[995]
        c55_5=output[996]
        c55_6=output[997]
        c55_7=output[998]
        c55_8=output[999]
        c55_9=output[1000]
        c55_10=output[1001]
        c55_11=output[1002]
        c55_12=output[1003]
        c55_13=output[1004]
        c55_14=output[1005]
        c55_15=output[1006]
        c55_17=output[1007]
        tr_56=output[1008]
        c56_0=output[1009]
        c56_1=output[1010]
        c56_2=output[1011]
        c56_3=output[1012]
        c56_4=output[1013]
        c56_5=output[1014]
        c56_6=output[1015]
        c56_7=output[1016]
        c56_8=output[1017]
        c56_9=output[1018]
        c56_10=output[1019]
        c56_11=output[1020]
        c56_12=output[1021]
        c56_13=output[1022]
        c56_14=output[1023]
        c56_15=output[1024]
        c56_17=output[1025]
        tr_57=output[1026]
        c57_0=output[1027]
        c57_1=output[1028]
        c57_2=output[1029]
        c57_3=output[1030]
        c57_4=output[1031]
        c57_5=output[1032]
        c57_6=output[1033]
        c57_7=output[1034]
        c57_8=output[1035]
        c57_9=output[1036]
        c57_10=output[1037]
        c57_11=output[1038]
        c57_12=output[1039]
        c57_13=output[1040]
        c57_14=output[1041]
        c57_15=output[1042]
        c57_17=output[1043]
        tr_58=output[1044]
        c58_0=output[1045]
        c58_1=output[1046]
        c58_2=output[1047]
        c58_3=output[1048]
        c58_4=output[1049]
        c58_5=output[1050]
        c58_6=output[1051]
        c58_7=output[1052]
        c58_8=output[1053]
        c58_9=output[1054]
        c58_10=output[1055]
        c58_11=output[1056]
        c58_12=output[1057]
        c58_13=output[1058]
        c58_14=output[1059]
        c58_15=output[1060]
        c58_17=output[1061]
        tr_59=output[1062]
        c59_0=output[1063]
        c59_1=output[1064]
        c59_2=output[1065]
        c59_3=output[1066]
        c59_4=output[1067]
        c59_5=output[1068]
        c59_6=output[1069]
        c59_7=output[1070]
        c59_8=output[1071]
        c59_9=output[1072]
        c59_10=output[1073]
        c59_11=output[1074]
        c59_12=output[1075]
        c59_13=output[1076]
        c59_14=output[1077]
        c59_15=output[1078]
        c59_17=output[1079]
        tr_60=output[1080]
        c60_0=output[1081]
        c60_1=output[1082]
        c60_2=output[1083]
        c60_3=output[1084]
        c60_4=output[1085]
        c60_5=output[1086]
        c60_6=output[1087]
        c60_7=output[1088]
        c60_8=output[1089]
        c60_9=output[1090]
        c60_10=output[1091]
        c60_11=output[1092]
        c60_12=output[1093]
        c60_13=output[1094]
        c60_14=output[1095]
        c60_15=output[1096]
        c60_17=output[1097]
        tr_61=output[1098]
        c61_0=output[1099]
        c61_1=output[1100]
        c61_2=output[1101]
        c61_3=output[1102]
        c61_4=output[1103]
        c61_5=output[1104]
        c61_6=output[1105]
        c61_7=output[1106]
        c61_8=output[1107]
        c61_9=output[1108]
        c61_10=output[1109]
        c61_11=output[1110]
        c61_12=output[1111]
        c61_13=output[1112]
        c61_14=output[1113]
        c61_15=output[1114]
        c61_17=output[1115]
        tr_62=output[1116]
        c62_0=output[1117]
        c62_1=output[1118]
        c62_2=output[1119]
        c62_3=output[1120]
        c62_4=output[1121]
        c62_5=output[1122]
        c62_6=output[1123]
        c62_7=output[1124]
        c62_8=output[1125]
        c62_9=output[1126]
        c62_10=output[1127]
        c62_11=output[1128]
        c62_12=output[1129]
        c62_13=output[1130]
        c62_14=output[1131]
        c62_15=output[1132]
        c62_17=output[1133]
        tr_63=output[1134]
        c63_0=output[1135]
        c63_1=output[1136]
        c63_2=output[1137]
        c63_3=output[1138]
        c63_4=output[1139]
        c63_5=output[1140]
        c63_6=output[1141]
        c63_7=output[1142]
        c63_8=output[1143]
        c63_9=output[1144]
        c63_10=output[1145]
        c63_11=output[1146]
        c63_12=output[1147]
        c63_13=output[1148]
        c63_14=output[1149]
        c63_15=output[1150]
        c63_17=output[1151]
        tr_64=output[1152]
        c64_0=output[1153]
        c64_1=output[1154]
        c64_2=output[1155]
        c64_3=output[1156]
        c64_4=output[1157]
        c64_5=output[1158]
        c64_6=output[1159]
        c64_7=output[1160]
        c64_8=output[1161]
        c64_9=output[1162]
        c64_10=output[1163]
        c64_11=output[1164]
        c64_12=output[1165]
        c64_13=output[1166]
        c64_14=output[1167]
        c64_15=output[1168]
        c64_17=output[1169]
        tr_65=output[1170]
        c65_0=output[1171]
        c65_1=output[1172]
        c65_2=output[1173]
        c65_3=output[1174]
        c65_4=output[1175]
        c65_5=output[1176]
        c65_6=output[1177]
        c65_7=output[1178]
        c65_8=output[1179]
        c65_9=output[1180]
        c65_10=output[1181]
        c65_11=output[1182]
        c65_12=output[1183]
        c65_13=output[1184]
        c65_14=output[1185]
        c65_15=output[1186]
        c65_17=output[1187]
        tr_66=output[1188]
        c66_0=output[1189]
        c66_1=output[1190]
        c66_2=output[1191]
        c66_3=output[1192]
        c66_4=output[1193]
        c66_5=output[1194]
        c66_6=output[1195]
        c66_7=output[1196]
        c66_8=output[1197]
        c66_9=output[1198]
        c66_10=output[1199]
        c66_11=output[1200]
        c66_12=output[1201]
        c66_13=output[1202]
        c66_14=output[1203]
        c66_15=output[1204]
        c66_17=output[1205]
        tr_67=output[1206]
        c67_0=output[1207]
        c67_1=output[1208]
        c67_2=output[1209]
        c67_3=output[1210]
        c67_4=output[1211]
        c67_5=output[1212]
        c67_6=output[1213]
        c67_7=output[1214]
        c67_8=output[1215]
        c67_9=output[1216]
        c67_10=output[1217]
        c67_11=output[1218]
        c67_12=output[1219]
        c67_13=output[1220]
        c67_14=output[1221]
        c67_15=output[1222]
        c67_17=output[1223]
        tr_68=output[1224]
        c68_0=output[1225]
        c68_1=output[1226]
        c68_2=output[1227]
        c68_3=output[1228]
        c68_4=output[1229]
        c68_5=output[1230]
        c68_6=output[1231]
        c68_7=output[1232]
        c68_8=output[1233]
        c68_9=output[1234]
        c68_10=output[1235]
        c68_11=output[1236]
        c68_12=output[1237]
        c68_13=output[1238]
        c68_14=output[1239]
        c68_15=output[1240]
        c68_17=output[1241]
        tr_69=output[1242]
        c69_0=output[1243]
        c69_1=output[1244]
        c69_2=output[1245]
        c69_3=output[1246]
        c69_4=output[1247]
        c69_5=output[1248]
        c69_6=output[1249]
        c69_7=output[1250]
        c69_8=output[1251]
        c69_9=output[1252]
        c69_10=output[1253]
        c69_11=output[1254]
        c69_12=output[1255]
        c69_13=output[1256]
        c69_14=output[1257]
        c69_15=output[1258]
        c69_17=output[1259]
        tr_70=output[1260]
        c70_0=output[1261]
        c70_1=output[1262]
        c70_2=output[1263]
        c70_3=output[1264]
        c70_4=output[1265]
        c70_5=output[1266]
        c70_6=output[1267]
        c70_7=output[1268]
        c70_8=output[1269]
        c70_9=output[1270]
        c70_10=output[1271]
        c70_11=output[1272]
        c70_12=output[1273]
        c70_13=output[1274]
        c70_14=output[1275]
        c70_15=output[1276]
        c70_17=output[1277]
        tr_71=output[1278]
        c71_0=output[1279]
        c71_1=output[1280]
        c71_2=output[1281]
        c71_3=output[1282]
        c71_4=output[1283]
        c71_5=output[1284]
        c71_6=output[1285]
        c71_7=output[1286]
        c71_8=output[1287]
        c71_9=output[1288]
        c71_10=output[1289]
        c71_11=output[1290]
        c71_12=output[1291]
        c71_13=output[1292]
        c71_14=output[1293]
        c71_15=output[1294]
        c71_17=output[1295]
        tr_72=output[1296]
        c72_0=output[1297]
        c72_1=output[1298]
        c72_2=output[1299]
        c72_3=output[1300]
        c72_4=output[1301]
        c72_5=output[1302]
        c72_6=output[1303]
        c72_7=output[1304]
        c72_8=output[1305]
        c72_9=output[1306]
        c72_10=output[1307]
        c72_11=output[1308]
        c72_12=output[1309]
        c72_13=output[1310]
        c72_14=output[1311]
        c72_15=output[1312]
        c72_17=output[1313]
        tr_73=output[1314]
        c73_0=output[1315]
        c73_1=output[1316]
        c73_2=output[1317]
        c73_3=output[1318]
        c73_4=output[1319]
        c73_5=output[1320]
        c73_6=output[1321]
        c73_7=output[1322]
        c73_8=output[1323]
        c73_9=output[1324]
        c73_10=output[1325]
        c73_11=output[1326]
        c73_12=output[1327]
        c73_13=output[1328]
        c73_14=output[1329]
        c73_15=output[1330]
        c73_17=output[1331]
        tr_74=output[1332]
        c74_0=output[1333]
        c74_1=output[1334]
        c74_2=output[1335]
        c74_3=output[1336]
        c74_4=output[1337]
        c74_5=output[1338]
        c74_6=output[1339]
        c74_7=output[1340]
        c74_8=output[1341]
        c74_9=output[1342]
        c74_10=output[1343]
        c74_11=output[1344]
        c74_12=output[1345]
        c74_13=output[1346]
        c74_14=output[1347]
        c74_15=output[1348]
        c74_17=output[1349]
        tr_75=output[1350]
        c75_0=output[1351]
        c75_1=output[1352]
        c75_2=output[1353]
        c75_3=output[1354]
        c75_4=output[1355]
        c75_5=output[1356]
        c75_6=output[1357]
        c75_7=output[1358]
        c75_8=output[1359]
        c75_9=output[1360]
        c75_10=output[1361]
        c75_11=output[1362]
        c75_12=output[1363]
        c75_13=output[1364]
        c75_14=output[1365]
        c75_15=output[1366]
        c75_17=output[1367]
        tr_76=output[1368]
        c76_0=output[1369]
        c76_1=output[1370]
        c76_2=output[1371]
        c76_3=output[1372]
        c76_4=output[1373]
        c76_5=output[1374]
        c76_6=output[1375]
        c76_7=output[1376]
        c76_8=output[1377]
        c76_9=output[1378]
        c76_10=output[1379]
        c76_11=output[1380]
        c76_12=output[1381]
        c76_13=output[1382]
        c76_14=output[1383]
        c76_15=output[1384]
        c76_17=output[1385]
        tr_77=output[1386]
        c77_0=output[1387]
        c77_1=output[1388]
        c77_2=output[1389]
        c77_3=output[1390]
        c77_4=output[1391]
        c77_5=output[1392]
        c77_6=output[1393]
        c77_7=output[1394]
        c77_8=output[1395]
        c77_9=output[1396]
        c77_10=output[1397]
        c77_11=output[1398]
        c77_12=output[1399]
        c77_13=output[1400]
        c77_14=output[1401]
        c77_15=output[1402]
        c77_17=output[1403]
        tr_78=output[1404]
        c78_0=output[1405]
        c78_1=output[1406]
        c78_2=output[1407]
        c78_3=output[1408]
        c78_4=output[1409]
        c78_5=output[1410]
        c78_6=output[1411]
        c78_7=output[1412]
        c78_8=output[1413]
        c78_9=output[1414]
        c78_10=output[1415]
        c78_11=output[1416]
        c78_12=output[1417]
        c78_13=output[1418]
        c78_14=output[1419]
        c78_15=output[1420]
        c78_17=output[1421]
        tr_79=output[1422]
        c79_0=output[1423]
        c79_1=output[1424]
        c79_2=output[1425]
        c79_3=output[1426]
        c79_4=output[1427]
        c79_5=output[1428]
        c79_6=output[1429]
        c79_7=output[1430]
        c79_8=output[1431]
        c79_9=output[1432]
        c79_10=output[1433]
        c79_11=output[1434]
        c79_12=output[1435]
        c79_13=output[1436]
        c79_14=output[1437]
        c79_15=output[1438]
        c79_17=output[1439]
        tr_80=output[1440]
        c80_0=output[1441]
        c80_1=output[1442]
        c80_2=output[1443]
        c80_3=output[1444]
        c80_4=output[1445]
        c80_5=output[1446]
        c80_6=output[1447]
        c80_7=output[1448]
        c80_8=output[1449]
        c80_9=output[1450]
        c80_10=output[1451]
        c80_11=output[1452]
        c80_12=output[1453]
        c80_13=output[1454]
        c80_14=output[1455]
        c80_15=output[1456]
        c80_17=output[1457]
        tr_81=output[1458]
        c81_0=output[1459]
        c81_1=output[1460]
        c81_2=output[1461]
        c81_3=output[1462]
        c81_4=output[1463]
        c81_5=output[1464]
        c81_6=output[1465]
        c81_7=output[1466]
        c81_8=output[1467]
        c81_9=output[1468]
        c81_10=output[1469]
        c81_11=output[1470]
        c81_12=output[1471]
        c81_13=output[1472]
        c81_14=output[1473]
        c81_15=output[1474]
        c81_17=output[1475]
        tr_82=output[1476]
        c82_0=output[1477]
        c82_1=output[1478]
        c82_2=output[1479]
        c82_3=output[1480]
        c82_4=output[1481]
        c82_5=output[1482]
        c82_6=output[1483]
        c82_7=output[1484]
        c82_8=output[1485]
        c82_9=output[1486]
        c82_10=output[1487]
        c82_11=output[1488]
        c82_12=output[1489]
        c82_13=output[1490]
        c82_14=output[1491]
        c82_15=output[1492]
        c82_17=output[1493]
        tr_83=output[1494]
        c83_0=output[1495]
        c83_1=output[1496]
        c83_2=output[1497]
        c83_3=output[1498]
        c83_4=output[1499]
        c83_5=output[1500]
        c83_6=output[1501]
        c83_7=output[1502]
        c83_8=output[1503]
        c83_9=output[1504]
        c83_10=output[1505]
        c83_11=output[1506]
        c83_12=output[1507]
        c83_13=output[1508]
        c83_14=output[1509]
        c83_15=output[1510]
        c83_17=output[1511]
        tr_84=output[1512]
        c84_0=output[1513]
        c84_1=output[1514]
        c84_2=output[1515]
        c84_3=output[1516]
        c84_4=output[1517]
        c84_5=output[1518]
        c84_6=output[1519]
        c84_7=output[1520]
        c84_8=output[1521]
        c84_9=output[1522]
        c84_10=output[1523]
        c84_11=output[1524]
        c84_12=output[1525]
        c84_13=output[1526]
        c84_14=output[1527]
        c84_15=output[1528]
        c84_17=output[1529]
        tr_85=output[1530]
        c85_0=output[1531]
        c85_1=output[1532]
        c85_2=output[1533]
        c85_3=output[1534]
        c85_4=output[1535]
        c85_5=output[1536]
        c85_6=output[1537]
        c85_7=output[1538]
        c85_8=output[1539]
        c85_9=output[1540]
        c85_10=output[1541]
        c85_11=output[1542]
        c85_12=output[1543]
        c85_13=output[1544]
        c85_14=output[1545]
        c85_15=output[1546]
        c85_17=output[1547]
        tr_86=output[1548]
        c86_0=output[1549]
        c86_1=output[1550]
        c86_2=output[1551]
        c86_3=output[1552]
        c86_4=output[1553]
        c86_5=output[1554]
        c86_6=output[1555]
        c86_7=output[1556]
        c86_8=output[1557]
        c86_9=output[1558]
        c86_10=output[1559]
        c86_11=output[1560]
        c86_12=output[1561]
        c86_13=output[1562]
        c86_14=output[1563]
        c86_15=output[1564]
        c86_17=output[1565]
        tr_87=output[1566]
        c87_0=output[1567]
        c87_1=output[1568]
        c87_2=output[1569]
        c87_3=output[1570]
        c87_4=output[1571]
        c87_5=output[1572]
        c87_6=output[1573]
        c87_7=output[1574]
        c87_8=output[1575]
        c87_9=output[1576]
        c87_10=output[1577]
        c87_11=output[1578]
        c87_12=output[1579]
        c87_13=output[1580]
        c87_14=output[1581]
        c87_15=output[1582]
        c87_17=output[1583]
        tr_88=output[1584]
        c88_0=output[1585]
        c88_1=output[1586]
        c88_2=output[1587]
        c88_3=output[1588]
        c88_4=output[1589]
        c88_5=output[1590]
        c88_6=output[1591]
        c88_7=output[1592]
        c88_8=output[1593]
        c88_9=output[1594]
        c88_10=output[1595]
        c88_11=output[1596]
        c88_12=output[1597]
        c88_13=output[1598]
        c88_14=output[1599]
        c88_15=output[1600]
        c88_17=output[1601]
        tr_89=output[1602]
        c89_0=output[1603]
        c89_1=output[1604]
        c89_2=output[1605]
        c89_3=output[1606]
        c89_4=output[1607]
        c89_5=output[1608]
        c89_6=output[1609]
        c89_7=output[1610]
        c89_8=output[1611]
        c89_9=output[1612]
        c89_10=output[1613]
        c89_11=output[1614]
        c89_12=output[1615]
        c89_13=output[1616]
        c89_14=output[1617]
        c89_15=output[1618]
        c89_17=output[1619]
        tr_90=output[1620]
        c90_0=output[1621]
        c90_1=output[1622]
        c90_2=output[1623]
        c90_3=output[1624]
        c90_4=output[1625]
        c90_5=output[1626]
        c90_6=output[1627]
        c90_7=output[1628]
        c90_8=output[1629]
        c90_9=output[1630]
        c90_10=output[1631]
        c90_11=output[1632]
        c90_12=output[1633]
        c90_13=output[1634]
        c90_14=output[1635]
        c90_15=output[1636]
        c90_17=output[1637]
        tr_91=output[1638]
        c91_0=output[1639]
        c91_1=output[1640]
        c91_2=output[1641]
        c91_3=output[1642]
        c91_4=output[1643]
        c91_5=output[1644]
        c91_6=output[1645]
        c91_7=output[1646]
        c91_8=output[1647]
        c91_9=output[1648]
        c91_10=output[1649]
        c91_11=output[1650]
        c91_12=output[1651]
        c91_13=output[1652]
        c91_14=output[1653]
        c91_15=output[1654]
        c91_17=output[1655]
        tr_92=output[1656]
        c92_0=output[1657]
        c92_1=output[1658]
        c92_2=output[1659]
        c92_3=output[1660]
        c92_4=output[1661]
        c92_5=output[1662]
        c92_6=output[1663]
        c92_7=output[1664]
        c92_8=output[1665]
        c92_9=output[1666]
        c92_10=output[1667]
        c92_11=output[1668]
        c92_12=output[1669]
        c92_13=output[1670]
        c92_14=output[1671]
        c92_15=output[1672]
        c92_17=output[1673]
        tr_93=output[1674]
        c93_0=output[1675]
        c93_1=output[1676]
        c93_2=output[1677]
        c93_3=output[1678]
        c93_4=output[1679]
        c93_5=output[1680]
        c93_6=output[1681]
        c93_7=output[1682]
        c93_8=output[1683]
        c93_9=output[1684]
        c93_10=output[1685]
        c93_11=output[1686]
        c93_12=output[1687]
        c93_13=output[1688]
        c93_14=output[1689]
        c93_15=output[1690]
        c93_17=output[1691]
        tr_94=output[1692]
        c94_0=output[1693]
        c94_1=output[1694]
        c94_2=output[1695]
        c94_3=output[1696]
        c94_4=output[1697]
        c94_5=output[1698]
        c94_6=output[1699]
        c94_7=output[1700]
        c94_8=output[1701]
        c94_9=output[1702]
        c94_10=output[1703]
        c94_11=output[1704]
        c94_12=output[1705]
        c94_13=output[1706]
        c94_14=output[1707]
        c94_15=output[1708]
        c94_17=output[1709]
        tr_95=output[1710]
        c95_0=output[1711]
        c95_1=output[1712]
        c95_2=output[1713]
        c95_3=output[1714]
        c95_4=output[1715]
        c95_5=output[1716]
        c95_6=output[1717]
        c95_7=output[1718]
        c95_8=output[1719]
        c95_9=output[1720]
        c95_10=output[1721]
        c95_11=output[1722]
        c95_12=output[1723]
        c95_13=output[1724]
        c95_14=output[1725]
        c95_15=output[1726]
        c95_17=output[1727]
        tr_96=output[1728]
        c96_0=output[1729]
        c96_1=output[1730]
        c96_2=output[1731]
        c96_3=output[1732]
        c96_4=output[1733]
        c96_5=output[1734]
        c96_6=output[1735]
        c96_7=output[1736]
        c96_8=output[1737]
        c96_9=output[1738]
        c96_10=output[1739]
        c96_11=output[1740]
        c96_12=output[1741]
        c96_13=output[1742]
        c96_14=output[1743]
        c96_15=output[1744]
        c96_17=output[1745]
        tr_97=output[1746]
        c97_0=output[1747]
        c97_1=output[1748]
        c97_2=output[1749]
        c97_3=output[1750]
        c97_4=output[1751]
        c97_5=output[1752]
        c97_6=output[1753]
        c97_7=output[1754]
        c97_8=output[1755]
        c97_9=output[1756]
        c97_10=output[1757]
        c97_11=output[1758]
        c97_12=output[1759]
        c97_13=output[1760]
        c97_14=output[1761]
        c97_15=output[1762]
        c97_17=output[1763]
        tr_98=output[1764]
        c98_0=output[1765]
        c98_1=output[1766]
        c98_2=output[1767]
        c98_3=output[1768]
        c98_4=output[1769]
        c98_5=output[1770]
        c98_6=output[1771]
        c98_7=output[1772]
        c98_8=output[1773]
        c98_9=output[1774]
        c98_10=output[1775]
        c98_11=output[1776]
        c98_12=output[1777]
        c98_13=output[1778]
        c98_14=output[1779]
        c98_15=output[1780]
        c98_17=output[1781]
        tr_99=output[1782]
        c99_0=output[1783]
        c99_1=output[1784]
        c99_2=output[1785]
        c99_3=output[1786]
        c99_4=output[1787]
        c99_5=output[1788]
        c99_6=output[1789]
        c99_7=output[1790]
        c99_8=output[1791]
        c99_9=output[1792]
        c99_10=output[1793]
        c99_11=output[1794]
        c99_12=output[1795]
        c99_13=output[1796]
        c99_14=output[1797]
        c99_15=output[1798]
        c99_17=output[1799]
        tr_100=output[1800]
        c96_loop=int(output[1801])
        speed0=float(output[1802])
        speed1=float(output[1803])
        speed2=float(output[1804])
        speed3=float(output[1805])
        speed4=float(output[1806])
        speed5=float(output[1807])
        speed6=float(output[1808])
        speed7=float(output[1809])
        speed8=float(output[1810])
        speed9=float(output[1811])
        speed10=float(output[1812])
        speed11=float(output[1813])
        speed12=float(output[1814])
        speed13=float(output[1815])
        speed14=float(output[1816])
        speed15=float(output[1817])
        speed16=float(output[1818])
        speed17=float(output[1819])
        speed18=float(output[1820])
        speed19=float(output[1821])
        speed20=float(output[1822])
        speed21=float(output[1823])
        speed22=float(output[1824])
        speed23=float(output[1825])
        speed24=float(output[1826])
        speed25=float(output[1827])
        speed26=float(output[1828])
        speed27=float(output[1829])
        speed28=float(output[1830])
        speed29=float(output[1831])
        speed30=float(output[1832])
        speed31=float(output[1833])
        speed32=float(output[1834])
        speed33=float(output[1835])
        speed34=float(output[1836])
        speed35=float(output[1837])
        speed36=float(output[1838])
        speed37=float(output[1839])
        speed38=float(output[1840])
        speed39=float(output[1841])
        speed40=float(output[1842])
        speed41=float(output[1843])
        speed42=float(output[1844])
        speed43=float(output[1845])
        speed44=float(output[1846])
        speed45=float(output[1847])
        speed46=float(output[1848])
        speed47=float(output[1849])
        speed48=float(output[1850])
        speed49=float(output[1851])
        speed50=float(output[1852])
        speed51=float(output[1853])
        speed52=float(output[1854])
        speed53=float(output[1855])
        speed54=float(output[1856])
        speed55=float(output[1857])
        speed56=float(output[1858])
        speed57=float(output[1859])
        speed58=float(output[1860])
        speed59=float(output[1861])
        speed60=float(output[1862])
        speed61=float(output[1863])
        speed62=float(output[1864])
        speed63=float(output[1865])
        speed64=float(output[1866])
        speed65=float(output[1867])
        speed66=float(output[1868])
        speed67=float(output[1869])
        speed68=float(output[1870])
        speed69=float(output[1871])
        speed70=float(output[1872])
        speed71=float(output[1873])
        speed72=float(output[1874])
        speed73=float(output[1875])
        speed74=float(output[1876])
        speed75=float(output[1877])
        speed76=float(output[1878])
        speed77=float(output[1879])
        speed78=float(output[1880])
        speed79=float(output[1881])
        speed80=float(output[1882])
        speed81=float(output[1883])
        speed82=float(output[1884])
        speed83=float(output[1885])
        speed84=float(output[1886])
        speed85=float(output[1887])
        speed86=float(output[1888])
        speed87=float(output[1889])
        speed88=float(output[1890])
        speed89=float(output[1891])
        speed90=float(output[1892])
        speed91=float(output[1893])
        speed92=float(output[1894])
        speed93=float(output[1895])
        speed94=float(output[1896])
        speed95=float(output[1897])
        speed96=float(output[1898])
        speed97=float(output[1899])
        speed98=float(output[1900])
        speed99=float(output[1901])        
        repeat=float(output[1902])
        loop=int(output[1903])

    show_speed0.set(speed0)
    showspeed0.configure(text=show_speed0.get())
    show_speed1.set(speed1)
    showspeed1.configure(text=show_speed1.get())
    show_speed2.set(speed2)
    showspeed2.configure(text=show_speed2.get())
    show_speed3.set(speed3)
    showspeed3.configure(text=show_speed3.get())
    show_speed4.set(speed4)
    showspeed4.configure(text=show_speed4.get())
    show_speed5.set(speed5)
    showspeed5.configure(text=show_speed5.get())
    show_speed6.set(speed6)
    showspeed6.configure(text=show_speed6.get())
    show_speed7.set(speed7)
    showspeed7.configure(text=show_speed7.get())
    show_speed8.set(speed8)
    showspeed8.configure(text=show_speed8.get())
    show_speed9.set(speed9)
    showspeed9.configure(text=show_speed9.get())
    show_speed10.set(speed10)
    showspeed10.configure(text=show_speed10.get())
    show_speed11.set(speed11)
    showspeed11.configure(text=show_speed11.get())
    show_speed12.set(speed12)
    showspeed12.configure(text=show_speed12.get())
    show_speed13.set(speed13)
    showspeed13.configure(text=show_speed13.get())
    show_speed14.set(speed14)
    showspeed14.configure(text=show_speed14.get())
    show_speed15.set(speed15)
    showspeed15.configure(text=show_speed15.get())
    show_speed16.set(speed16)
    showspeed16.configure(text=show_speed16.get())
    show_speed17.set(speed17)
    showspeed17.configure(text=show_speed17.get())
    show_speed18.set(speed18)
    showspeed18.configure(text=show_speed18.get())
    show_speed19.set(speed19)
    showspeed19.configure(text=show_speed19.get())
    show_speed20.set(speed20)
    showspeed20.configure(text=show_speed20.get())
    show_speed21.set(speed21)
    showspeed21.configure(text=show_speed21.get())
    show_speed22.set(speed22)
    showspeed22.configure(text=show_speed22.get())
    show_speed23.set(speed23)
    showspeed23.configure(text=show_speed23.get())
    show_speed24.set(speed24)
    showspeed24.configure(text=show_speed24.get())
    show_speed25.set(speed25)
    showspeed25.configure(text=show_speed25.get())
    show_speed26.set(speed26)
    showspeed26.configure(text=show_speed26.get())
    show_speed27.set(speed27)
    showspeed27.configure(text=show_speed27.get())
    show_speed28.set(speed28)
    showspeed28.configure(text=show_speed28.get())
    show_speed29.set(speed29)
    showspeed29.configure(text=show_speed29.get())
    show_speed30.set(speed30)
    showspeed30.configure(text=show_speed30.get())
    show_speed31.set(speed31)
    showspeed31.configure(text=show_speed31.get())
    show_speed32.set(speed32)
    showspeed32.configure(text=show_speed32.get())
    show_speed33.set(speed33)
    showspeed33.configure(text=show_speed33.get())
    show_speed34.set(speed34)
    showspeed34.configure(text=show_speed34.get())
    show_speed35.set(speed35)
    showspeed35.configure(text=show_speed35.get())
    show_speed36.set(speed36)
    showspeed36.configure(text=show_speed36.get())
    show_speed37.set(speed37)
    showspeed37.configure(text=show_speed37.get())
    show_speed38.set(speed38)
    showspeed38.configure(text=show_speed38.get())
    show_speed39.set(speed39)
    showspeed39.configure(text=show_speed39.get())
    show_speed40.set(speed40)
    showspeed40.configure(text=show_speed40.get())
    show_speed41.set(speed41)
    showspeed41.configure(text=show_speed41.get())
    show_speed42.set(speed42)
    showspeed42.configure(text=show_speed42.get())
    show_speed43.set(speed43)
    showspeed43.configure(text=show_speed43.get())
    show_speed44.set(speed44)
    showspeed44.configure(text=show_speed44.get())
    show_speed45.set(speed45)
    showspeed45.configure(text=show_speed45.get())
    show_speed46.set(speed46)
    showspeed46.configure(text=show_speed46.get())
    show_speed47.set(speed47)
    showspeed47.configure(text=show_speed47.get())
    show_speed48.set(speed48)
    showspeed48.configure(text=show_speed48.get())
    show_speed49.set(speed49)
    showspeed49.configure(text=show_speed49.get())
    show_speed50.set(speed50)
    showspeed50.configure(text=show_speed50.get())
    show_speed51.set(speed51)
    showspeed51.configure(text=show_speed51.get())
    show_speed52.set(speed52)
    showspeed52.configure(text=show_speed52.get())
    show_speed53.set(speed53)
    showspeed53.configure(text=show_speed53.get())
    show_speed54.set(speed54)
    showspeed54.configure(text=show_speed54.get())
    show_speed55.set(speed55)
    showspeed55.configure(text=show_speed55.get())
    show_speed56.set(speed56)
    showspeed56.configure(text=show_speed56.get())
    show_speed57.set(speed57)
    showspeed57.configure(text=show_speed57.get())
    show_speed58.set(speed58)
    showspeed58.configure(text=show_speed58.get())
    show_speed59.set(speed59)
    showspeed59.configure(text=show_speed59.get())
    show_speed60.set(speed60)
    showspeed60.configure(text=show_speed60.get())
    show_speed61.set(speed61)
    showspeed61.configure(text=show_speed61.get())
    show_speed62.set(speed62)
    showspeed62.configure(text=show_speed62.get())
    show_speed63.set(speed63)
    showspeed63.configure(text=show_speed63.get())
    show_speed64.set(speed64)
    showspeed64.configure(text=show_speed64.get())
    show_speed65.set(speed65)
    showspeed65.configure(text=show_speed65.get())
    show_speed66.set(speed66)
    showspeed66.configure(text=show_speed66.get())
    show_speed67.set(speed67)
    showspeed67.configure(text=show_speed67.get())
    show_speed68.set(speed68)
    showspeed68.configure(text=show_speed68.get())
    show_speed69.set(speed69)
    showspeed69.configure(text=show_speed69.get())
    show_speed70.set(speed70)
    showspeed70.configure(text=show_speed70.get())
    show_speed71.set(speed71)
    showspeed71.configure(text=show_speed71.get())
    show_speed72.set(speed72)
    showspeed72.configure(text=show_speed72.get())
    show_speed73.set(speed73)
    showspeed73.configure(text=show_speed73.get())
    show_speed74.set(speed74)
    showspeed74.configure(text=show_speed74.get())
    show_speed75.set(speed75)
    showspeed75.configure(text=show_speed75.get())
    show_speed76.set(speed76)
    showspeed76.configure(text=show_speed76.get())
    show_speed77.set(speed77)
    showspeed77.configure(text=show_speed77.get())
    show_speed78.set(speed78)
    showspeed78.configure(text=show_speed78.get())
    show_speed79.set(speed79)
    showspeed79.configure(text=show_speed79.get())
    show_speed80.set(speed80)
    showspeed80.configure(text=show_speed80.get())
    show_speed81.set(speed81)
    showspeed81.configure(text=show_speed81.get())
    show_speed82.set(speed82)
    showspeed82.configure(text=show_speed82.get())
    show_speed83.set(speed83)
    showspeed83.configure(text=show_speed83.get())
    show_speed84.set(speed84)
    showspeed84.configure(text=show_speed84.get())
    show_speed85.set(speed85)
    showspeed85.configure(text=show_speed85.get())
    show_speed86.set(speed86)
    showspeed86.configure(text=show_speed86.get())
    show_speed87.set(speed87)
    showspeed87.configure(text=show_speed87.get())
    show_speed88.set(speed88)
    showspeed88.configure(text=show_speed88.get())
    show_speed89.set(speed89)
    showspeed89.configure(text=show_speed89.get())
    show_speed90.set(speed90)
    showspeed90.configure(text=show_speed90.get())
    show_speed91.set(speed91)
    showspeed91.configure(text=show_speed91.get())
    show_speed92.set(speed92)
    showspeed92.configure(text=show_speed92.get())
    show_speed93.set(speed93)
    showspeed93.configure(text=show_speed93.get())
    show_speed94.set(speed94)
    showspeed94.configure(text=show_speed94.get())
    show_speed95.set(speed95)
    showspeed95.configure(text=show_speed95.get())
    show_speed96.set(speed96)
    showspeed96.configure(text=show_speed96.get())
    show_speed97.set(speed97)
    showspeed97.configure(text=show_speed97.get())
    show_speed98.set(speed98)
    showspeed98.configure(text=show_speed98.get())
    show_speed99.set(speed99)
    showspeed99.configure(text=show_speed99.get())
    show_repeat.set(repeat)
    showrepeat.configure(text=show_repeat.get())
    show_loop.set(loop)
    showloop.configure(text=show_loop.get())

    if c0_0=='0' and b0_0var.get()==1:
        b0_0.invoke()
    if c0_0=='1' and b0_0var.get()==0:
        b0_0.invoke()
    if c0_1=='0' and b0_1var.get()==1:
        b0_1.invoke()
    if c0_1=='1' and b0_1var.get()==0:
        b0_1.invoke()
    if c0_2=='0' and b0_2var.get()==1:
        b0_2.invoke()
    if c0_2=='1' and b0_2var.get()==0:
        b0_2.invoke()
    if c0_3=='0' and b0_3var.get()==1:
        b0_3.invoke()
    if c0_3=='1' and b0_3var.get()==0:
        b0_3.invoke()
    if c0_4=='0' and b0_4var.get()==1:
        b0_4.invoke()
    if c0_4=='1' and b0_4var.get()==0:
        b0_4.invoke()
    if c0_5=='0' and b0_5var.get()==1:
        b0_5.invoke()
    if c0_5=='1' and b0_5var.get()==0:
        b0_5.invoke()
    if c0_6=='0' and b0_6var.get()==1:
        b0_6.invoke()
    if c0_6=='1' and b0_6var.get()==0:
        b0_6.invoke()
    if c0_7=='0' and b0_7var.get()==1:
        b0_7.invoke()
    if c0_7=='1' and b0_7var.get()==0:
        b0_7.invoke()
    if c0_8=='0' and b0_8var.get()==1:
        b0_8.invoke()
    if c0_8=='1' and b0_8var.get()==0:
        b0_8.invoke()
    if c0_9=='0' and b0_9var.get()==1:
        b0_9invoke()
    if c0_9=='1' and b0_9var.get()==0:
        b0_9.invoke()
    if c0_10=='0' and b0_10var.get()==1:
        b0_10.invoke()
    if c0_10=='1' and b0_10var.get()==0:
        b0_10.invoke()
    if c0_11=='0' and b0_11var.get()==1:
        b0_11.invoke()
    if c0_11=='1' and b0_11var.get()==0:
        b0_11.invoke()
    if c0_12=='0' and b0_12var.get()==1:
        b0_12.invoke()
    if c0_12=='1' and b0_12var.get()==0:
        b0_12.invoke()
    if c0_13=='0' and b0_13var.get()==1:
        b0_13.invoke()
    if c0_13=='1' and b0_13var.get()==0:
        b0_13.invoke()
    if c0_14=='0' and b0_14var.get()==1:
        b0_14.invoke()
    if c0_14=='1' and b0_14var.get()==0:
        b0_14.invoke()
    if c0_15=='0' and b0_15var.get()==1:
        b0_15.invoke()
    if c0_15=='1' and b0_15var.get()==0:
        b0_15.invoke()
    if c0_16=='0' and b0_16var.get()==1:
        b0_16.invoke()
    if c0_16=='1' and b0_16var.get()==0:
        b0_16.invoke()
    if c0_17=='0' and b0_17var.get()==1:
        b0_17.invoke()
    if c0_17=='1' and b0_17var.get()==0:
        b0_17.invoke()
    if tr_1=='1' and trig_1var.get()==0:
        trig_1.invoke()

    if c1_0=='0' and b1_0var.get()==1:
        b1_0.invoke()
    if c1_0=='1' and b1_0var.get()==0:
        b1_0.invoke()
    if c1_1=='0' and b1_1var.get()==1:
        b1_1.invoke()
    if c1_1=='1' and b1_1var.get()==0:
        b1_1.invoke()
    if c1_2=='0' and b1_2var.get()==1:
        b1_2.invoke()
    if c1_2=='1' and b1_2var.get()==0:
        b1_2.invoke()
    if c1_3=='0' and b1_3var.get()==1:
        b1_3.invoke()
    if c1_3=='1' and b1_3var.get()==0:
        b1_3.invoke()
    if c1_4=='0' and b1_4var.get()==1:
        b1_4.invoke()
    if c1_4=='1' and b1_4var.get()==0:
        b1_4.invoke()
    if c1_5=='0' and b1_5var.get()==1:
        b1_5.invoke()
    if c1_5=='1' and b1_5var.get()==0:
        b1_5.invoke()
    if c1_6=='0' and b1_6var.get()==1:
        b1_6.invoke()
    if c1_6=='1' and b1_6var.get()==0:
        b1_6.invoke()
    if c1_7=='0' and b1_7var.get()==1:
        b1_7.invoke()
    if c1_7=='1' and b1_7var.get()==0:
        b1_7.invoke()
    if c1_8=='0' and b1_8var.get()==1:
        b1_8.invoke()
    if c1_8=='1' and b1_8var.get()==0:
        b1_8.invoke()
    if c1_9=='0' and b1_9var.get()==1:
        b1_9invoke()
    if c1_9=='1' and b1_9var.get()==0:
        b1_9.invoke()
    if c1_10=='0' and b1_10var.get()==1:
        b1_10.invoke()
    if c1_10=='1' and b1_10var.get()==0:
        b1_10.invoke()
    if c1_11=='0' and b1_11var.get()==1:
        b1_11.invoke()
    if c1_11=='1' and b1_11var.get()==0:
        b1_11.invoke()
    if c1_12=='0' and b1_12var.get()==1:
        b1_12.invoke()
    if c1_12=='1' and b1_12var.get()==0:
        b1_12.invoke()
    if c1_13=='0' and b1_13var.get()==1:
        b1_13.invoke()
    if c1_13=='1' and b1_13var.get()==0:
        b1_13.invoke()
    if c1_14=='0' and b1_14var.get()==1:
        b1_14.invoke()
    if c1_14=='1' and b1_14var.get()==0:
        b1_14.invoke()
    if c1_15=='0' and b1_15var.get()==1:
        b1_15.invoke()
    if c1_15=='1' and b1_15var.get()==0:
        b1_15.invoke()
    if c1_17=='0' and b1_17var.get()==1:
        b1_17.invoke()
    if c1_17=='1' and b1_17var.get()==0:
        b1_17.invoke()
    if tr_2=='1' and trig_2var.get()==0:
        trig_2.invoke()

    if c2_0=='0' and b2_0var.get()==1:
        b2_0.invoke()
    if c2_0=='1' and b2_0var.get()==0:
        b2_0.invoke()
    if c2_1=='0' and b2_1var.get()==1:
        b2_1.invoke()
    if c2_1=='1' and b2_1var.get()==0:
        b2_1.invoke()
    if c2_2=='0' and b2_2var.get()==1:
        b2_2.invoke()
    if c2_2=='1' and b2_2var.get()==0:
        b2_2.invoke()
    if c2_3=='0' and b2_3var.get()==1:
        b2_3.invoke()
    if c2_3=='1' and b2_3var.get()==0:
        b2_3.invoke()
    if c2_4=='0' and b2_4var.get()==1:
        b2_4.invoke()
    if c2_4=='1' and b2_4var.get()==0:
        b2_4.invoke()
    if c2_5=='0' and b2_5var.get()==1:
        b2_5.invoke()
    if c2_5=='1' and b2_5var.get()==0:
        b2_5.invoke()
    if c2_6=='0' and b2_6var.get()==1:
        b2_6.invoke()
    if c2_6=='1' and b2_6var.get()==0:
        b2_6.invoke()
    if c2_7=='0' and b2_7var.get()==1:
        b2_7.invoke()
    if c2_7=='1' and b2_7var.get()==0:
        b2_7.invoke()
    if c2_8=='0' and b2_8var.get()==1:
        b2_8.invoke()
    if c2_8=='1' and b2_8var.get()==0:
        b2_8.invoke()
    if c2_9=='0' and b2_9var.get()==1:
        b2_9invoke()
    if c2_9=='1' and b2_9var.get()==0:
        b2_9.invoke()
    if c2_10=='0' and b2_10var.get()==1:
        b2_10.invoke()
    if c2_10=='1' and b2_10var.get()==0:
        b2_10.invoke()
    if c2_11=='0' and b2_11var.get()==1:
        b2_11.invoke()
    if c2_11=='1' and b2_11var.get()==0:
        b2_11.invoke()
    if c2_12=='0' and b2_12var.get()==1:
        b2_12.invoke()
    if c2_12=='1' and b2_12var.get()==0:
        b2_12.invoke()
    if c2_13=='0' and b2_13var.get()==1:
        b2_13.invoke()
    if c2_13=='1' and b2_13var.get()==0:
        b2_13.invoke()
    if c2_14=='0' and b2_14var.get()==1:
        b2_14.invoke()
    if c2_14=='1' and b2_14var.get()==0:
        b2_14.invoke()
    if c2_15=='0' and b2_15var.get()==1:
        b2_15.invoke()
    if c2_15=='1' and b2_15var.get()==0:
        b2_15.invoke()
    if c2_17=='0' and b2_17var.get()==1:
        b2_17.invoke()
    if c2_17=='1' and b2_17var.get()==0:
        b2_17.invoke()
    if tr_3=='1' and trig_3var.get()==0:
        trig_3.invoke()

    if c3_0=='0' and b3_0var.get()==1:
        b3_0.invoke()
    if c3_0=='1' and b3_0var.get()==0:
        b3_0.invoke()
    if c3_1=='0' and b3_1var.get()==1:
        b3_1.invoke()
    if c3_1=='1' and b3_1var.get()==0:
        b3_1.invoke()
    if c3_2=='0' and b3_2var.get()==1:
        b3_2.invoke()
    if c3_2=='1' and b3_2var.get()==0:
        b3_2.invoke()
    if c3_3=='0' and b3_3var.get()==1:
        b3_3.invoke()
    if c3_3=='1' and b3_3var.get()==0:
        b3_3.invoke()
    if c3_4=='0' and b3_4var.get()==1:
        b3_4.invoke()
    if c3_4=='1' and b3_4var.get()==0:
        b3_4.invoke()
    if c3_5=='0' and b3_5var.get()==1:
        b3_5.invoke()
    if c3_5=='1' and b3_5var.get()==0:
        b3_5.invoke()
    if c3_6=='0' and b3_6var.get()==1:
        b3_6.invoke()
    if c3_6=='1' and b3_6var.get()==0:
        b3_6.invoke()
    if c3_7=='0' and b3_7var.get()==1:
        b3_7.invoke()
    if c3_7=='1' and b3_7var.get()==0:
        b3_7.invoke()
    if c3_8=='0' and b3_8var.get()==1:
        b3_8.invoke()
    if c3_8=='1' and b3_8var.get()==0:
        b3_8.invoke()
    if c3_9=='0' and b3_9var.get()==1:
        b3_9invoke()
    if c3_9=='1' and b3_9var.get()==0:
        b3_9.invoke()
    if c3_10=='0' and b3_10var.get()==1:
        b3_10.invoke()
    if c3_10=='1' and b3_10var.get()==0:
        b3_10.invoke()
    if c3_11=='0' and b3_11var.get()==1:
        b3_11.invoke()
    if c3_11=='1' and b3_11var.get()==0:
        b3_11.invoke()
    if c3_12=='0' and b3_12var.get()==1:
        b3_12.invoke()
    if c3_12=='1' and b3_12var.get()==0:
        b3_12.invoke()
    if c3_13=='0' and b3_13var.get()==1:
        b3_13.invoke()
    if c3_13=='1' and b3_13var.get()==0:
        b3_13.invoke()
    if c3_14=='0' and b3_14var.get()==1:
        b3_14.invoke()
    if c3_14=='1' and b3_14var.get()==0:
        b3_14.invoke()
    if c3_15=='0' and b3_15var.get()==1:
        b3_15.invoke()
    if c3_15=='1' and b3_15var.get()==0:
        b3_15.invoke()
    if c3_17=='0' and b3_17var.get()==1:
        b3_17.invoke()
    if c3_17=='1' and b3_17var.get()==0:
        b3_17.invoke()
    if tr_4=='1' and trig_4var.get()==0:
        trig_4.invoke()

    if c4_0=='0' and b4_0var.get()==1:
        b4_0.invoke()
    if c4_0=='1' and b4_0var.get()==0:
        b4_0.invoke()
    if c4_1=='0' and b4_1var.get()==1:
        b4_1.invoke()
    if c4_1=='1' and b4_1var.get()==0:
        b4_1.invoke()
    if c4_2=='0' and b4_2var.get()==1:
        b4_2.invoke()
    if c4_2=='1' and b4_2var.get()==0:
        b4_2.invoke()
    if c4_3=='0' and b4_3var.get()==1:
        b4_3.invoke()
    if c4_3=='1' and b4_3var.get()==0:
        b4_3.invoke()
    if c4_4=='0' and b4_4var.get()==1:
        b4_4.invoke()
    if c4_4=='1' and b4_4var.get()==0:
        b4_4.invoke()
    if c4_5=='0' and b4_5var.get()==1:
        b4_5.invoke()
    if c4_5=='1' and b4_5var.get()==0:
        b4_5.invoke()
    if c4_6=='0' and b4_6var.get()==1:
        b4_6.invoke()
    if c4_6=='1' and b4_6var.get()==0:
        b4_6.invoke()
    if c4_7=='0' and b4_7var.get()==1:
        b4_7.invoke()
    if c4_7=='1' and b4_7var.get()==0:
        b4_7.invoke()
    if c4_8=='0' and b4_8var.get()==1:
        b4_8.invoke()
    if c4_8=='1' and b4_8var.get()==0:
        b4_8.invoke()
    if c4_9=='0' and b4_9var.get()==1:
        b4_9invoke()
    if c4_9=='1' and b4_9var.get()==0:
        b4_9.invoke()
    if c4_10=='0' and b4_10var.get()==1:
        b4_10.invoke()
    if c4_10=='1' and b4_10var.get()==0:
        b4_10.invoke()
    if c4_11=='0' and b4_11var.get()==1:
        b4_11.invoke()
    if c4_11=='1' and b4_11var.get()==0:
        b4_11.invoke()
    if c4_12=='0' and b4_12var.get()==1:
        b4_12.invoke()
    if c4_12=='1' and b4_12var.get()==0:
        b4_12.invoke()
    if c4_13=='0' and b4_13var.get()==1:
        b4_13.invoke()
    if c4_13=='1' and b4_13var.get()==0:
        b4_13.invoke()
    if c4_14=='0' and b4_14var.get()==1:
        b4_14.invoke()
    if c4_14=='1' and b4_14var.get()==0:
        b4_14.invoke()
    if c4_15=='0' and b4_15var.get()==1:
        b4_15.invoke()
    if c4_15=='1' and b4_15var.get()==0:
        b4_15.invoke()
    if c4_17=='0' and b4_17var.get()==1:
        b4_17.invoke()
    if c4_17=='1' and b4_17var.get()==0:
        b4_17.invoke()
    if tr_5=='1' and trig_5var.get()==0:
        trig_5.invoke()

    if c5_0=='0' and b5_0var.get()==1:
        b5_0.invoke()
    if c5_0=='1' and b5_0var.get()==0:
        b5_0.invoke()
    if c5_1=='0' and b5_1var.get()==1:
        b5_1.invoke()
    if c5_1=='1' and b5_1var.get()==0:
        b5_1.invoke()
    if c5_2=='0' and b5_2var.get()==1:
        b5_2.invoke()
    if c5_2=='1' and b5_2var.get()==0:
        b5_2.invoke()
    if c5_3=='0' and b5_3var.get()==1:
        b5_3.invoke()
    if c5_3=='1' and b5_3var.get()==0:
        b5_3.invoke()
    if c5_4=='0' and b5_4var.get()==1:
        b5_4.invoke()
    if c5_4=='1' and b5_4var.get()==0:
        b5_4.invoke()
    if c5_5=='0' and b5_5var.get()==1:
        b5_5.invoke()
    if c5_5=='1' and b5_5var.get()==0:
        b5_5.invoke()
    if c5_6=='0' and b5_6var.get()==1:
        b5_6.invoke()
    if c5_6=='1' and b5_6var.get()==0:
        b5_6.invoke()
    if c5_7=='0' and b5_7var.get()==1:
        b5_7.invoke()
    if c5_7=='1' and b5_7var.get()==0:
        b5_7.invoke()
    if c5_8=='0' and b5_8var.get()==1:
        b5_8.invoke()
    if c5_8=='1' and b5_8var.get()==0:
        b5_8.invoke()
    if c5_9=='0' and b5_9var.get()==1:
        b5_9.invoke()
    if c5_9=='1' and b5_9var.get()==0:
        b5_9.invoke()
    if c5_10=='0' and b5_10var.get()==1:
        b5_10.invoke()
    if c5_10=='1' and b5_10var.get()==0:
        b5_10.invoke()
    if c5_11=='0' and b5_11var.get()==1:
        b5_11.invoke()
    if c5_11=='1' and b5_11var.get()==0:
        b5_11.invoke()
    if c5_12=='0' and b5_12var.get()==1:
        b5_12.invoke()
    if c5_12=='1' and b5_12var.get()==0:
        b5_12.invoke()
    if c5_13=='0' and b5_13var.get()==1:
        b5_13.invoke()
    if c5_13=='1' and b5_13var.get()==0:
        b5_13.invoke()
    if c5_14=='0' and b5_14var.get()==1:
        b5_14.invoke()
    if c5_14=='1' and b5_14var.get()==0:
        b5_14.invoke()
    if c5_15=='0' and b5_15var.get()==1:
        b5_15.invoke()
    if c5_15=='1' and b5_15var.get()==0:
        b5_15.invoke()
    if c5_17=='0' and b5_17var.get()==1:
        b5_17.invoke()
    if c5_17=='1' and b5_17var.get()==0:
        b5_17.invoke()
    if tr_6=='1' and trig_6var.get()==0:
        trig_6.invoke()

    if c6_0=='0' and b6_0var.get()==1:
        b6_0.invoke()
    if c6_0=='1' and b6_0var.get()==0:
        b6_0.invoke()
    if c6_1=='0' and b6_1var.get()==1:
        b6_1.invoke()
    if c6_1=='1' and b6_1var.get()==0:
        b6_1.invoke()
    if c6_2=='0' and b6_2var.get()==1:
        b6_2.invoke()
    if c6_2=='1' and b6_2var.get()==0:
        b6_2.invoke()
    if c6_3=='0' and b6_3var.get()==1:
        b6_3.invoke()
    if c6_3=='1' and b6_3var.get()==0:
        b6_3.invoke()
    if c6_4=='0' and b6_4var.get()==1:
        b6_4.invoke()
    if c6_4=='1' and b6_4var.get()==0:
        b6_4.invoke()
    if c6_5=='0' and b6_5var.get()==1:
        b6_5.invoke()
    if c6_5=='1' and b6_5var.get()==0:
        b6_5.invoke()
    if c6_6=='0' and b6_6var.get()==1:
        b6_6.invoke()
    if c6_6=='1' and b6_6var.get()==0:
        b6_6.invoke()
    if c6_7=='0' and b6_7var.get()==1:
        b6_7.invoke()
    if c6_7=='1' and b6_7var.get()==0:
        b6_7.invoke()
    if c6_8=='0' and b6_8var.get()==1:
        b6_8.invoke()
    if c6_8=='1' and b6_8var.get()==0:
        b6_8.invoke()
    if c6_9=='0' and b6_9var.get()==1:
        b6_9invoke()
    if c6_9=='1' and b6_9var.get()==0:
        b6_9.invoke()
    if c6_10=='0' and b6_10var.get()==1:
        b6_10.invoke()
    if c6_10=='1' and b6_10var.get()==0:
        b6_10.invoke()
    if c6_11=='0' and b6_11var.get()==1:
        b6_11.invoke()
    if c6_11=='1' and b6_11var.get()==0:
        b6_11.invoke()
    if c6_12=='0' and b6_12var.get()==1:
        b6_12.invoke()
    if c6_12=='1' and b6_12var.get()==0:
        b6_12.invoke()
    if c6_13=='0' and b6_13var.get()==1:
        b6_13.invoke()
    if c6_13=='1' and b6_13var.get()==0:
        b6_13.invoke()
    if c6_14=='0' and b6_14var.get()==1:
        b6_14.invoke()
    if c6_14=='1' and b6_14var.get()==0:
        b6_14.invoke()
    if c6_15=='0' and b6_15var.get()==1:
        b6_15.invoke()
    if c6_15=='1' and b6_15var.get()==0:
        b6_15.invoke()
    if c6_17=='0' and b6_17var.get()==1:
        b6_17.invoke()
    if c6_17=='1' and b6_17var.get()==0:
        b6_17.invoke()
    if tr_7=='1' and trig_7var.get()==0:
        trig_7.invoke()

    if c7_0=='0' and b7_0var.get()==1:
        b7_0.invoke()
    if c7_0=='1' and b7_0var.get()==0:
        b7_0.invoke()
    if c7_1=='0' and b7_1var.get()==1:
        b7_1.invoke()
    if c7_1=='1' and b7_1var.get()==0:
        b7_1.invoke()
    if c7_2=='0' and b7_2var.get()==1:
        b7_2.invoke()
    if c7_2=='1' and b7_2var.get()==0:
        b7_2.invoke()
    if c7_3=='0' and b7_3var.get()==1:
        b7_3.invoke()
    if c7_3=='1' and b7_3var.get()==0:
        b7_3.invoke()
    if c7_4=='0' and b7_4var.get()==1:
        b7_4.invoke()
    if c7_4=='1' and b7_4var.get()==0:
        b7_4.invoke()
    if c7_5=='0' and b7_5var.get()==1:
        b7_5.invoke()
    if c7_5=='1' and b7_5var.get()==0:
        b7_5.invoke()
    if c7_6=='0' and b7_6var.get()==1:
        b7_6.invoke()
    if c7_6=='1' and b7_6var.get()==0:
        b7_6.invoke()
    if c7_7=='0' and b7_7var.get()==1:
        b7_7.invoke()
    if c7_7=='1' and b7_7var.get()==0:
        b7_7.invoke()
    if c7_8=='0' and b7_8var.get()==1:
        b7_8.invoke()
    if c7_8=='1' and b7_8var.get()==0:
        b7_8.invoke()
    if c7_9=='0' and b7_9var.get()==1:
        b7_9invoke()
    if c7_9=='1' and b7_9var.get()==0:
        b7_9.invoke()
    if c7_10=='0' and b7_10var.get()==1:
        b7_10.invoke()
    if c7_10=='1' and b7_10var.get()==0:
        b7_10.invoke()
    if c7_11=='0' and b7_11var.get()==1:
        b7_11.invoke()
    if c7_11=='1' and b7_11var.get()==0:
        b7_11.invoke()
    if c7_12=='0' and b7_12var.get()==1:
        b7_12.invoke()
    if c7_12=='1' and b7_12var.get()==0:
        b7_12.invoke()
    if c7_13=='0' and b7_13var.get()==1:
        b7_13.invoke()
    if c7_13=='1' and b7_13var.get()==0:
        b7_13.invoke()
    if c7_14=='0' and b7_14var.get()==1:
        b7_14.invoke()
    if c7_14=='1' and b7_14var.get()==0:
        b7_14.invoke()
    if c7_15=='0' and b7_15var.get()==1:
        b7_15.invoke()
    if c7_15=='1' and b7_15var.get()==0:
        b7_15.invoke()
    if c7_17=='0' and b7_17var.get()==1:
        b7_17.invoke()
    if c7_17=='1' and b7_17var.get()==0:
        b7_17.invoke()
    if tr_8=='1' and trig_8var.get()==0:
        trig_8.invoke()

    if c8_0=='0' and b8_0var.get()==1:
        b8_0.invoke()
    if c8_0=='1' and b8_0var.get()==0:
        b8_0.invoke()
    if c8_1=='0' and b8_1var.get()==1:
        b8_1.invoke()
    if c8_1=='1' and b8_1var.get()==0:
        b8_1.invoke()
    if c8_2=='0' and b8_2var.get()==1:
        b8_2.invoke()
    if c8_2=='1' and b8_2var.get()==0:
        b8_2.invoke()
    if c8_3=='0' and b8_3var.get()==1:
        b8_3.invoke()
    if c8_3=='1' and b8_3var.get()==0:
        b8_3.invoke()
    if c8_4=='0' and b8_4var.get()==1:
        b8_4.invoke()
    if c8_4=='1' and b8_4var.get()==0:
        b8_4.invoke()
    if c8_5=='0' and b8_5var.get()==1:
        b8_5.invoke()
    if c8_5=='1' and b8_5var.get()==0:
        b8_5.invoke()
    if c8_6=='0' and b8_6var.get()==1:
        b8_6.invoke()
    if c8_6=='1' and b8_6var.get()==0:
        b8_6.invoke()
    if c8_7=='0' and b8_7var.get()==1:
        b8_7.invoke()
    if c8_7=='1' and b8_7var.get()==0:
        b8_7.invoke()
    if c8_8=='0' and b8_8var.get()==1:
        b8_8.invoke()
    if c8_8=='1' and b8_8var.get()==0:
        b8_8.invoke()
    if c8_9=='0' and b8_9var.get()==1:
        b8_9invoke()
    if c8_9=='1' and b8_9var.get()==0:
        b8_9.invoke()
    if c8_10=='0' and b8_10var.get()==1:
        b8_10.invoke()
    if c8_10=='1' and b8_10var.get()==0:
        b8_10.invoke()
    if c8_11=='0' and b8_11var.get()==1:
        b8_11.invoke()
    if c8_11=='1' and b8_11var.get()==0:
        b8_11.invoke()
    if c8_12=='0' and b8_12var.get()==1:
        b8_12.invoke()
    if c8_12=='1' and b8_12var.get()==0:
        b8_12.invoke()
    if c8_13=='0' and b8_13var.get()==1:
        b8_13.invoke()
    if c8_13=='1' and b8_13var.get()==0:
        b8_13.invoke()
    if c8_14=='0' and b8_14var.get()==1:
        b8_14.invoke()
    if c8_14=='1' and b8_14var.get()==0:
        b8_14.invoke()
    if c8_15=='0' and b8_15var.get()==1:
        b8_15.invoke()
    if c8_15=='1' and b8_15var.get()==0:
        b8_15.invoke()
    if c8_17=='0' and b8_17var.get()==1:
        b8_17.invoke()
    if c8_17=='1' and b8_17var.get()==0:
        b8_17.invoke()
    if tr_9=='1' and trig_9var.get()==0:
        trig_9.invoke()

    if c9_0=='0' and b9_0var.get()==1:
        b9_0.invoke()
    if c9_0=='1' and b9_0var.get()==0:
        b9_0.invoke()
    if c9_1=='0' and b9_1var.get()==1:
        b9_1.invoke()
    if c9_1=='1' and b9_1var.get()==0:
        b9_1.invoke()
    if c9_2=='0' and b9_2var.get()==1:
        b9_2.invoke()
    if c9_2=='1' and b9_2var.get()==0:
        b9_2.invoke()
    if c9_3=='0' and b9_3var.get()==1:
        b9_3.invoke()
    if c9_3=='1' and b9_3var.get()==0:
        b9_3.invoke()
    if c9_4=='0' and b9_4var.get()==1:
        b9_4.invoke()
    if c9_4=='1' and b9_4var.get()==0:
        b9_4.invoke()
    if c9_5=='0' and b9_5var.get()==1:
        b9_5.invoke()
    if c9_5=='1' and b9_5var.get()==0:
        b9_5.invoke()
    if c9_6=='0' and b9_6var.get()==1:
        b9_6.invoke()
    if c9_6=='1' and b9_6var.get()==0:
        b9_6.invoke()
    if c9_7=='0' and b9_7var.get()==1:
        b9_7.invoke()
    if c9_7=='1' and b9_7var.get()==0:
        b9_7.invoke()
    if c9_8=='0' and b9_8var.get()==1:
        b9_8.invoke()
    if c9_8=='1' and b9_8var.get()==0:
        b9_8.invoke()
    if c9_9=='0' and b9_9var.get()==1:
        b9_9invoke()
    if c9_9=='1' and b9_9var.get()==0:
        b9_9.invoke()
    if c9_10=='0' and b9_10var.get()==1:
        b9_10.invoke()
    if c9_10=='1' and b9_10var.get()==0:
        b9_10.invoke()
    if c9_11=='0' and b9_11var.get()==1:
        b9_11.invoke()
    if c9_11=='1' and b9_11var.get()==0:
        b9_11.invoke()
    if c9_12=='0' and b9_12var.get()==1:
        b9_12.invoke()
    if c9_12=='1' and b9_12var.get()==0:
        b9_12.invoke()
    if c9_13=='0' and b9_13var.get()==1:
        b9_13.invoke()
    if c9_13=='1' and b9_13var.get()==0:
        b9_13.invoke()
    if c9_14=='0' and b9_14var.get()==1:
        b9_14.invoke()
    if c9_14=='1' and b9_14var.get()==0:
        b9_14.invoke()
    if c9_15=='0' and b9_15var.get()==1:
        b9_15.invoke()
    if c9_15=='1' and b9_15var.get()==0:
        b9_15.invoke()
    if c9_17=='0' and b9_17var.get()==1:
        b9_17.invoke()
    if c9_17=='1' and b9_17var.get()==0:
        b9_17.invoke()
    if tr_10=='1' and trig_10var.get()==0:
        trig_10.invoke()

    if c10_0=='0' and b10_0var.get()==1:
        b10_0.invoke()
    if c10_0=='1' and b10_0var.get()==0:
        b10_0.invoke()
    if c10_1=='0' and b10_1var.get()==1:
        b10_1.invoke()
    if c10_1=='1' and b10_1var.get()==0:
        b10_1.invoke()
    if c10_2=='0' and b10_2var.get()==1:
        b10_2.invoke()
    if c10_2=='1' and b10_2var.get()==0:
        b10_2.invoke()
    if c10_3=='0' and b10_3var.get()==1:
        b10_3.invoke()
    if c10_3=='1' and b10_3var.get()==0:
        b10_3.invoke()
    if c10_4=='0' and b10_4var.get()==1:
        b10_4.invoke()
    if c10_4=='1' and b10_4var.get()==0:
        b10_4.invoke()
    if c10_5=='0' and b10_5var.get()==1:
        b10_5.invoke()
    if c10_5=='1' and b10_5var.get()==0:
        b10_5.invoke()
    if c10_6=='0' and b10_6var.get()==1:
        b10_6.invoke()
    if c10_6=='1' and b10_6var.get()==0:
        b10_6.invoke()
    if c10_7=='0' and b10_7var.get()==1:
        b10_7.invoke()
    if c10_7=='1' and b10_7var.get()==0:
        b10_7.invoke()
    if c10_8=='0' and b10_8var.get()==1:
        b10_8.invoke()
    if c10_8=='1' and b10_8var.get()==0:
        b10_8.invoke()
    if c10_9=='0' and b10_9var.get()==1:
        b10_9invoke()
    if c10_9=='1' and b10_9var.get()==0:
        b10_9.invoke()
    if c10_10=='0' and b10_10var.get()==1:
        b10_10.invoke()
    if c10_10=='1' and b10_10var.get()==0:
        b10_10.invoke()
    if c10_11=='0' and b10_11var.get()==1:
        b10_11.invoke()
    if c10_11=='1' and b10_11var.get()==0:
        b10_11.invoke()
    if c10_12=='0' and b10_12var.get()==1:
        b10_12.invoke()
    if c10_12=='1' and b10_12var.get()==0:
        b10_12.invoke()
    if c10_13=='0' and b10_13var.get()==1:
        b10_13.invoke()
    if c10_13=='1' and b10_13var.get()==0:
        b10_13.invoke()
    if c10_14=='0' and b10_14var.get()==1:
        b10_14.invoke()
    if c10_14=='1' and b10_14var.get()==0:
        b10_14.invoke()
    if c10_15=='0' and b10_15var.get()==1:
        b10_15.invoke()
    if c10_15=='1' and b10_15var.get()==0:
        b10_15.invoke()
    if c10_17=='0' and b10_17var.get()==1:
        b10_17.invoke()
    if c10_17=='1' and b10_17var.get()==0:
        b10_17.invoke()
    if tr_11=='1' and trig_11var.get()==0:
        trig_11.invoke()
        
    if c11_0=='0' and b11_0var.get()==1:
        b11_0.invoke()
    if c11_0=='1' and b11_0var.get()==0:
        b11_0.invoke()
    if c11_1=='0' and b11_1var.get()==1:
        b11_1.invoke()
    if c11_1=='1' and b11_1var.get()==0:
        b11_1.invoke()
    if c11_2=='0' and b11_2var.get()==1:
        b11_2.invoke()
    if c11_2=='1' and b11_2var.get()==0:
        b11_2.invoke()
    if c11_3=='0' and b11_3var.get()==1:
        b11_3.invoke()
    if c11_3=='1' and b11_3var.get()==0:
        b11_3.invoke()
    if c11_4=='0' and b11_4var.get()==1:
        b11_4.invoke()
    if c11_4=='1' and b11_4var.get()==0:
        b11_4.invoke()
    if c11_5=='0' and b11_5var.get()==1:
        b11_5.invoke()
    if c11_5=='1' and b11_5var.get()==0:
        b11_5.invoke()
    if c11_6=='0' and b11_6var.get()==1:
        b11_6.invoke()
    if c11_6=='1' and b11_6var.get()==0:
        b11_6.invoke()
    if c11_7=='0' and b11_7var.get()==1:
        b11_7.invoke()
    if c11_7=='1' and b11_7var.get()==0:
        b11_7.invoke()
    if c11_8=='0' and b11_8var.get()==1:
        b11_8.invoke()
    if c11_8=='1' and b11_8var.get()==0:
        b11_8.invoke()
    if c11_9=='0' and b11_9var.get()==1:
        b11_9invoke()
    if c11_9=='1' and b11_9var.get()==0:
        b11_9.invoke()
    if c11_10=='0' and b11_10var.get()==1:
        b11_10.invoke()
    if c11_10=='1' and b11_10var.get()==0:
        b11_10.invoke()
    if c11_11=='0' and b11_11var.get()==1:
        b11_11.invoke()
    if c11_11=='1' and b11_11var.get()==0:
        b11_11.invoke()
    if c11_12=='0' and b11_12var.get()==1:
        b11_12.invoke()
    if c11_12=='1' and b11_12var.get()==0:
        b11_12.invoke()
    if c11_13=='0' and b11_13var.get()==1:
        b11_13.invoke()
    if c11_13=='1' and b11_13var.get()==0:
        b11_13.invoke()
    if c11_14=='0' and b11_14var.get()==1:
        b11_14.invoke()
    if c11_14=='1' and b11_14var.get()==0:
        b11_14.invoke()
    if c11_15=='0' and b11_15var.get()==1:
        b11_15.invoke()
    if c11_15=='1' and b11_15var.get()==0:
        b11_15.invoke()
    if c11_17=='0' and b11_17var.get()==1:
        b11_17.invoke()
    if c11_17=='1' and b11_17var.get()==0:
        b11_17.invoke()
    if tr_12=='1' and trig_12var.get()==0:
        trig_12.invoke()
        
    if c12_0=='0' and b12_0var.get()==1:
        b12_0.invoke()
    if c12_0=='1' and b12_0var.get()==0:
        b12_0.invoke()
    if c12_1=='0' and b12_1var.get()==1:
        b12_1.invoke()
    if c12_1=='1' and b12_1var.get()==0:
        b12_1.invoke()
    if c12_2=='0' and b12_2var.get()==1:
        b12_2.invoke()
    if c12_2=='1' and b12_2var.get()==0:
        b12_2.invoke()
    if c12_3=='0' and b12_3var.get()==1:
        b12_3.invoke()
    if c12_3=='1' and b12_3var.get()==0:
        b12_3.invoke()
    if c12_4=='0' and b12_4var.get()==1:
        b12_4.invoke()
    if c12_4=='1' and b12_4var.get()==0:
        b12_4.invoke()
    if c12_5=='0' and b12_5var.get()==1:
        b12_5.invoke()
    if c12_5=='1' and b12_5var.get()==0:
        b12_5.invoke()
    if c12_6=='0' and b12_6var.get()==1:
        b12_6.invoke()
    if c12_6=='1' and b12_6var.get()==0:
        b12_6.invoke()
    if c12_7=='0' and b12_7var.get()==1:
        b12_7.invoke()
    if c12_7=='1' and b12_7var.get()==0:
        b12_7.invoke()
    if c12_8=='0' and b12_8var.get()==1:
        b12_8.invoke()
    if c12_8=='1' and b12_8var.get()==0:
        b12_8.invoke()
    if c12_9=='0' and b12_9var.get()==1:
        b12_9invoke()
    if c12_9=='1' and b12_9var.get()==0:
        b12_9.invoke()
    if c12_10=='0' and b12_10var.get()==1:
        b12_10.invoke()
    if c12_10=='1' and b12_10var.get()==0:
        b12_10.invoke()
    if c12_11=='0' and b12_11var.get()==1:
        b12_11.invoke()
    if c12_11=='1' and b12_11var.get()==0:
        b12_11.invoke()
    if c12_12=='0' and b12_12var.get()==1:
        b12_12.invoke()
    if c12_12=='1' and b12_12var.get()==0:
        b12_12.invoke()
    if c12_13=='0' and b12_13var.get()==1:
        b12_13.invoke()
    if c12_13=='1' and b12_13var.get()==0:
        b12_13.invoke()
    if c12_14=='0' and b12_14var.get()==1:
        b12_14.invoke()
    if c12_14=='1' and b12_14var.get()==0:
        b12_14.invoke()
    if c12_15=='0' and b12_15var.get()==1:
        b12_15.invoke()
    if c12_15=='1' and b12_15var.get()==0:
        b12_15.invoke()
    if c12_17=='0' and b12_17var.get()==1:
        b12_17.invoke()
    if c12_17=='1' and b12_17var.get()==0:
        b12_17.invoke()
    if tr_13=='1' and trig_13var.get()==0:
        trig_13.invoke()
        
    if c13_0=='0' and b13_0var.get()==1:
        b13_0.invoke()
    if c13_0=='1' and b13_0var.get()==0:
        b13_0.invoke()
    if c13_1=='0' and b13_1var.get()==1:
        b13_1.invoke()
    if c13_1=='1' and b13_1var.get()==0:
        b13_1.invoke()
    if c13_2=='0' and b13_2var.get()==1:
        b13_2.invoke()
    if c13_2=='1' and b13_2var.get()==0:
        b13_2.invoke()
    if c13_3=='0' and b13_3var.get()==1:
        b13_3.invoke()
    if c13_3=='1' and b13_3var.get()==0:
        b13_3.invoke()
    if c13_4=='0' and b13_4var.get()==1:
        b13_4.invoke()
    if c13_4=='1' and b13_4var.get()==0:
        b13_4.invoke()
    if c13_5=='0' and b13_5var.get()==1:
        b13_5.invoke()
    if c13_5=='1' and b13_5var.get()==0:
        b13_5.invoke()
    if c13_6=='0' and b13_6var.get()==1:
        b13_6.invoke()
    if c13_6=='1' and b13_6var.get()==0:
        b13_6.invoke()
    if c13_7=='0' and b13_7var.get()==1:
        b13_7.invoke()
    if c13_7=='1' and b13_7var.get()==0:
        b13_7.invoke()
    if c13_8=='0' and b13_8var.get()==1:
        b13_8.invoke()
    if c13_8=='1' and b13_8var.get()==0:
        b13_8.invoke()
    if c13_9=='0' and b13_9var.get()==1:
        b13_9invoke()
    if c13_9=='1' and b13_9var.get()==0:
        b13_9.invoke()
    if c13_10=='0' and b13_10var.get()==1:
        b13_10.invoke()
    if c13_10=='1' and b13_10var.get()==0:
        b13_10.invoke()
    if c13_11=='0' and b13_11var.get()==1:
        b13_11.invoke()
    if c13_11=='1' and b13_11var.get()==0:
        b13_11.invoke()
    if c13_12=='0' and b13_12var.get()==1:
        b13_12.invoke()
    if c13_12=='1' and b13_12var.get()==0:
        b13_12.invoke()
    if c13_13=='0' and b13_13var.get()==1:
        b13_13.invoke()
    if c13_13=='1' and b13_13var.get()==0:
        b13_13.invoke()
    if c13_14=='0' and b13_14var.get()==1:
        b13_14.invoke()
    if c13_14=='1' and b13_14var.get()==0:
        b13_14.invoke()
    if c13_15=='0' and b13_15var.get()==1:
        b13_15.invoke()
    if c13_15=='1' and b13_15var.get()==0:
        b13_15.invoke()
    if c13_17=='0' and b13_17var.get()==1:
        b13_17.invoke()
    if c13_17=='1' and b13_17var.get()==0:
        b13_17.invoke()
    if tr_14=='1' and trig_14var.get()==0:
        trig_14.invoke()
        
    if c14_0=='0' and b14_0var.get()==1:
        b14_0.invoke()
    if c14_0=='1' and b14_0var.get()==0:
        b14_0.invoke()
    if c14_1=='0' and b14_1var.get()==1:
        b14_1.invoke()
    if c14_1=='1' and b14_1var.get()==0:
        b14_1.invoke()
    if c14_2=='0' and b14_2var.get()==1:
        b14_2.invoke()
    if c14_2=='1' and b14_2var.get()==0:
        b14_2.invoke()
    if c14_3=='0' and b14_3var.get()==1:
        b14_3.invoke()
    if c14_3=='1' and b14_3var.get()==0:
        b14_3.invoke()
    if c14_4=='0' and b14_4var.get()==1:
        b14_4.invoke()
    if c14_4=='1' and b14_4var.get()==0:
        b14_4.invoke()
    if c14_5=='0' and b14_5var.get()==1:
        b14_5.invoke()
    if c14_5=='1' and b14_5var.get()==0:
        b14_5.invoke()
    if c14_6=='0' and b14_6var.get()==1:
        b14_6.invoke()
    if c14_6=='1' and b14_6var.get()==0:
        b14_6.invoke()
    if c14_7=='0' and b14_7var.get()==1:
        b14_7.invoke()
    if c14_7=='1' and b14_7var.get()==0:
        b14_7.invoke()
    if c14_8=='0' and b14_8var.get()==1:
        b14_8.invoke()
    if c14_8=='1' and b14_8var.get()==0:
        b14_8.invoke()
    if c14_9=='0' and b14_9var.get()==1:
        b14_9invoke()
    if c14_9=='1' and b14_9var.get()==0:
        b14_9.invoke()
    if c14_10=='0' and b14_10var.get()==1:
        b14_10.invoke()
    if c14_10=='1' and b14_10var.get()==0:
        b14_10.invoke()
    if c14_11=='0' and b14_11var.get()==1:
        b14_11.invoke()
    if c14_11=='1' and b14_11var.get()==0:
        b14_11.invoke()
    if c14_12=='0' and b14_12var.get()==1:
        b14_12.invoke()
    if c14_12=='1' and b14_12var.get()==0:
        b14_12.invoke()
    if c14_13=='0' and b14_13var.get()==1:
        b14_13.invoke()
    if c14_13=='1' and b14_13var.get()==0:
        b14_13.invoke()
    if c14_14=='0' and b14_14var.get()==1:
        b14_14.invoke()
    if c14_14=='1' and b14_14var.get()==0:
        b14_14.invoke()
    if c14_15=='0' and b14_15var.get()==1:
        b14_15.invoke()
    if c14_15=='1' and b14_15var.get()==0:
        b14_15.invoke()
    if c14_17=='0' and b14_17var.get()==1:
        b14_17.invoke()
    if c14_17=='1' and b14_17var.get()==0:
        b14_17.invoke()
    if tr_15=='1' and trig_15var.get()==0:
        trig_15.invoke()
        
    if c15_0=='0' and b15_0var.get()==1:
        b15_0.invoke()
    if c15_0=='1' and b15_0var.get()==0:
        b15_0.invoke()
    if c15_1=='0' and b15_1var.get()==1:
        b15_1.invoke()
    if c15_1=='1' and b15_1var.get()==0:
        b15_1.invoke()
    if c15_2=='0' and b15_2var.get()==1:
        b15_2.invoke()
    if c15_2=='1' and b15_2var.get()==0:
        b15_2.invoke()
    if c15_3=='0' and b15_3var.get()==1:
        b15_3.invoke()
    if c15_3=='1' and b15_3var.get()==0:
        b15_3.invoke()
    if c15_4=='0' and b15_4var.get()==1:
        b15_4.invoke()
    if c15_4=='1' and b15_4var.get()==0:
        b15_4.invoke()
    if c15_5=='0' and b15_5var.get()==1:
        b15_5.invoke()
    if c15_5=='1' and b15_5var.get()==0:
        b15_5.invoke()
    if c15_6=='0' and b15_6var.get()==1:
        b15_6.invoke()
    if c15_6=='1' and b15_6var.get()==0:
        b15_6.invoke()
    if c15_7=='0' and b15_7var.get()==1:
        b15_7.invoke()
    if c15_7=='1' and b15_7var.get()==0:
        b15_7.invoke()
    if c15_8=='0' and b15_8var.get()==1:
        b15_8.invoke()
    if c15_8=='1' and b15_8var.get()==0:
        b15_8.invoke()
    if c15_9=='0' and b15_9var.get()==1:
        b15_9invoke()
    if c15_9=='1' and b15_9var.get()==0:
        b15_9.invoke()
    if c15_10=='0' and b15_10var.get()==1:
        b15_10.invoke()
    if c15_10=='1' and b15_10var.get()==0:
        b15_10.invoke()
    if c15_11=='0' and b15_11var.get()==1:
        b15_11.invoke()
    if c15_11=='1' and b15_11var.get()==0:
        b15_11.invoke()
    if c15_12=='0' and b15_12var.get()==1:
        b15_12.invoke()
    if c15_12=='1' and b15_12var.get()==0:
        b15_12.invoke()
    if c15_13=='0' and b15_13var.get()==1:
        b15_13.invoke()
    if c15_13=='1' and b15_13var.get()==0:
        b15_13.invoke()
    if c15_14=='0' and b15_14var.get()==1:
        b15_14.invoke()
    if c15_14=='1' and b15_14var.get()==0:
        b15_14.invoke()
    if c15_15=='0' and b15_15var.get()==1:
        b15_15.invoke()
    if c15_15=='1' and b15_15var.get()==0:
        b15_15.invoke()
    if c15_17=='0' and b15_17var.get()==1:
        b15_17.invoke()
    if c15_17=='1' and b15_17var.get()==0:
        b15_17.invoke()
    if tr_16=='1' and trig_16var.get()==0:
        trig_16.invoke()
        
    if c16_0=='0' and b16_0var.get()==1:
        b16_0.invoke()
    if c16_0=='1' and b16_0var.get()==0:
        b16_0.invoke()
    if c16_1=='0' and b16_1var.get()==1:
        b16_1.invoke()
    if c16_1=='1' and b16_1var.get()==0:
        b16_1.invoke()
    if c16_2=='0' and b16_2var.get()==1:
        b16_2.invoke()
    if c16_2=='1' and b16_2var.get()==0:
        b16_2.invoke()
    if c16_3=='0' and b16_3var.get()==1:
        b16_3.invoke()
    if c16_3=='1' and b16_3var.get()==0:
        b16_3.invoke()
    if c16_4=='0' and b16_4var.get()==1:
        b16_4.invoke()
    if c16_4=='1' and b16_4var.get()==0:
        b16_4.invoke()
    if c16_5=='0' and b16_5var.get()==1:
        b16_5.invoke()
    if c16_5=='1' and b16_5var.get()==0:
        b16_5.invoke()
    if c16_6=='0' and b16_6var.get()==1:
        b16_6.invoke()
    if c16_6=='1' and b16_6var.get()==0:
        b16_6.invoke()
    if c16_7=='0' and b16_7var.get()==1:
        b16_7.invoke()
    if c16_7=='1' and b16_7var.get()==0:
        b16_7.invoke()
    if c16_8=='0' and b16_8var.get()==1:
        b16_8.invoke()
    if c16_8=='1' and b16_8var.get()==0:
        b16_8.invoke()
    if c16_9=='0' and b16_9var.get()==1:
        b16_9invoke()
    if c16_9=='1' and b16_9var.get()==0:
        b16_9.invoke()
    if c16_10=='0' and b16_10var.get()==1:
        b16_10.invoke()
    if c16_10=='1' and b16_10var.get()==0:
        b16_10.invoke()
    if c16_11=='0' and b16_11var.get()==1:
        b16_11.invoke()
    if c16_11=='1' and b16_11var.get()==0:
        b16_11.invoke()
    if c16_12=='0' and b16_12var.get()==1:
        b16_12.invoke()
    if c16_12=='1' and b16_12var.get()==0:
        b16_12.invoke()
    if c16_13=='0' and b16_13var.get()==1:
        b16_13.invoke()
    if c16_13=='1' and b16_13var.get()==0:
        b16_13.invoke()
    if c16_14=='0' and b16_14var.get()==1:
        b16_14.invoke()
    if c16_14=='1' and b16_14var.get()==0:
        b16_14.invoke()
    if c16_15=='0' and b16_15var.get()==1:
        b16_15.invoke()
    if c16_15=='1' and b16_15var.get()==0:
        b16_15.invoke()
    if c16_17=='0' and b16_17var.get()==1:
        b16_17.invoke()
    if c16_17=='1' and b16_17var.get()==0:
        b16_17.invoke()
    if tr_17=='1' and trig_17var.get()==0:
        trig_17.invoke()
        
    if c17_0=='0' and b17_0var.get()==1:
        b17_0.invoke()
    if c17_0=='1' and b17_0var.get()==0:
        b17_0.invoke()
    if c17_1=='0' and b17_1var.get()==1:
        b17_1.invoke()
    if c17_1=='1' and b17_1var.get()==0:
        b17_1.invoke()
    if c17_2=='0' and b17_2var.get()==1:
        b17_2.invoke()
    if c17_2=='1' and b17_2var.get()==0:
        b17_2.invoke()
    if c17_3=='0' and b17_3var.get()==1:
        b17_3.invoke()
    if c17_3=='1' and b17_3var.get()==0:
        b17_3.invoke()
    if c17_4=='0' and b17_4var.get()==1:
        b17_4.invoke()
    if c17_4=='1' and b17_4var.get()==0:
        b17_4.invoke()
    if c17_5=='0' and b17_5var.get()==1:
        b17_5.invoke()
    if c17_5=='1' and b17_5var.get()==0:
        b17_5.invoke()
    if c17_6=='0' and b17_6var.get()==1:
        b17_6.invoke()
    if c17_6=='1' and b17_6var.get()==0:
        b17_6.invoke()
    if c17_7=='0' and b17_7var.get()==1:
        b17_7.invoke()
    if c17_7=='1' and b17_7var.get()==0:
        b17_7.invoke()
    if c17_8=='0' and b17_8var.get()==1:
        b17_8.invoke()
    if c17_8=='1' and b17_8var.get()==0:
        b17_8.invoke()
    if c17_9=='0' and b17_9var.get()==1:
        b17_9invoke()
    if c17_9=='1' and b17_9var.get()==0:
        b17_9.invoke()
    if c17_10=='0' and b17_10var.get()==1:
        b17_10.invoke()
    if c17_10=='1' and b17_10var.get()==0:
        b17_10.invoke()
    if c17_11=='0' and b17_11var.get()==1:
        b17_11.invoke()
    if c17_11=='1' and b17_11var.get()==0:
        b17_11.invoke()
    if c17_12=='0' and b17_12var.get()==1:
        b17_12.invoke()
    if c17_12=='1' and b17_12var.get()==0:
        b17_12.invoke()
    if c17_13=='0' and b17_13var.get()==1:
        b17_13.invoke()
    if c17_13=='1' and b17_13var.get()==0:
        b17_13.invoke()
    if c17_14=='0' and b17_14var.get()==1:
        b17_14.invoke()
    if c17_14=='1' and b17_14var.get()==0:
        b17_14.invoke()
    if c17_15=='0' and b17_15var.get()==1:
        b17_15.invoke()
    if c17_15=='1' and b17_15var.get()==0:
        b17_15.invoke()
    if c17_17=='0' and b17_17var.get()==1:
        b17_17.invoke()
    if c17_17=='1' and b17_17var.get()==0:
        b17_17.invoke()
    if tr_18=='1' and trig_18var.get()==0:
        trig_18.invoke()
        
    if c18_0=='0' and b18_0var.get()==1:
        b18_0.invoke()
    if c18_0=='1' and b18_0var.get()==0:
        b18_0.invoke()
    if c18_1=='0' and b18_1var.get()==1:
        b18_1.invoke()
    if c18_1=='1' and b18_1var.get()==0:
        b18_1.invoke()
    if c18_2=='0' and b18_2var.get()==1:
        b18_2.invoke()
    if c18_2=='1' and b18_2var.get()==0:
        b18_2.invoke()
    if c18_3=='0' and b18_3var.get()==1:
        b18_3.invoke()
    if c18_3=='1' and b18_3var.get()==0:
        b18_3.invoke()
    if c18_4=='0' and b18_4var.get()==1:
        b18_4.invoke()
    if c18_4=='1' and b18_4var.get()==0:
        b18_4.invoke()
    if c18_5=='0' and b18_5var.get()==1:
        b18_5.invoke()
    if c18_5=='1' and b18_5var.get()==0:
        b18_5.invoke()
    if c18_6=='0' and b18_6var.get()==1:
        b18_6.invoke()
    if c18_6=='1' and b18_6var.get()==0:
        b18_6.invoke()
    if c18_7=='0' and b18_7var.get()==1:
        b18_7.invoke()
    if c18_7=='1' and b18_7var.get()==0:
        b18_7.invoke()
    if c18_8=='0' and b18_8var.get()==1:
        b18_8.invoke()
    if c18_8=='1' and b18_8var.get()==0:
        b18_8.invoke()
    if c18_9=='0' and b18_9var.get()==1:
        b18_9invoke()
    if c18_9=='1' and b18_9var.get()==0:
        b18_9.invoke()
    if c18_10=='0' and b18_10var.get()==1:
        b18_10.invoke()
    if c18_10=='1' and b18_10var.get()==0:
        b18_10.invoke()
    if c18_11=='0' and b18_11var.get()==1:
        b18_11.invoke()
    if c18_11=='1' and b18_11var.get()==0:
        b18_11.invoke()
    if c18_12=='0' and b18_12var.get()==1:
        b18_12.invoke()
    if c18_12=='1' and b18_12var.get()==0:
        b18_12.invoke()
    if c18_13=='0' and b18_13var.get()==1:
        b18_13.invoke()
    if c18_13=='1' and b18_13var.get()==0:
        b18_13.invoke()
    if c18_14=='0' and b18_14var.get()==1:
        b18_14.invoke()
    if c18_14=='1' and b18_14var.get()==0:
        b18_14.invoke()
    if c18_15=='0' and b18_15var.get()==1:
        b18_15.invoke()
    if c18_15=='1' and b18_15var.get()==0:
        b18_15.invoke()
    if c18_17=='0' and b18_17var.get()==1:
        b18_17.invoke()
    if c18_17=='1' and b18_17var.get()==0:
        b18_17.invoke()
    if tr_19=='1' and trig_19var.get()==0:
        trig_19.invoke()
        
    if c19_0=='0' and b19_0var.get()==1:
        b19_0.invoke()
    if c19_0=='1' and b19_0var.get()==0:
        b19_0.invoke()
    if c19_1=='0' and b19_1var.get()==1:
        b19_1.invoke()
    if c19_1=='1' and b19_1var.get()==0:
        b19_1.invoke()
    if c19_2=='0' and b19_2var.get()==1:
        b19_2.invoke()
    if c19_2=='1' and b19_2var.get()==0:
        b19_2.invoke()
    if c19_3=='0' and b19_3var.get()==1:
        b19_3.invoke()
    if c19_3=='1' and b19_3var.get()==0:
        b19_3.invoke()
    if c19_4=='0' and b19_4var.get()==1:
        b19_4.invoke()
    if c19_4=='1' and b19_4var.get()==0:
        b19_4.invoke()
    if c19_5=='0' and b19_5var.get()==1:
        b19_5.invoke()
    if c19_5=='1' and b19_5var.get()==0:
        b19_5.invoke()
    if c19_6=='0' and b19_6var.get()==1:
        b19_6.invoke()
    if c19_6=='1' and b19_6var.get()==0:
        b19_6.invoke()
    if c19_7=='0' and b19_7var.get()==1:
        b19_7.invoke()
    if c19_7=='1' and b19_7var.get()==0:
        b19_7.invoke()
    if c19_8=='0' and b19_8var.get()==1:
        b19_8.invoke()
    if c19_8=='1' and b19_8var.get()==0:
        b19_8.invoke()
    if c19_9=='0' and b19_9var.get()==1:
        b19_9invoke()
    if c19_9=='1' and b19_9var.get()==0:
        b19_9.invoke()
    if c19_10=='0' and b19_10var.get()==1:
        b19_10.invoke()
    if c19_10=='1' and b19_10var.get()==0:
        b19_10.invoke()
    if c19_11=='0' and b19_11var.get()==1:
        b19_11.invoke()
    if c19_11=='1' and b19_11var.get()==0:
        b19_11.invoke()
    if c19_12=='0' and b19_12var.get()==1:
        b19_12.invoke()
    if c19_12=='1' and b19_12var.get()==0:
        b19_12.invoke()
    if c19_13=='0' and b19_13var.get()==1:
        b19_13.invoke()
    if c19_13=='1' and b19_13var.get()==0:
        b19_13.invoke()
    if c19_14=='0' and b19_14var.get()==1:
        b19_14.invoke()
    if c19_14=='1' and b19_14var.get()==0:
        b19_14.invoke()
    if c19_15=='0' and b19_15var.get()==1:
        b19_15.invoke()
    if c19_15=='1' and b19_15var.get()==0:
        b19_15.invoke()
    if c19_17=='0' and b19_17var.get()==1:
        b19_17.invoke()
    if c19_17=='1' and b19_17var.get()==0:
        b19_17.invoke()
    if tr_20=='1' and trig_20var.get()==0:
        trig_20.invoke()
        
    if c20_0=='0' and b20_0var.get()==1:
        b20_0.invoke()
    if c20_0=='1' and b20_0var.get()==0:
        b20_0.invoke()
    if c20_1=='0' and b20_1var.get()==1:
        b20_1.invoke()
    if c20_1=='1' and b20_1var.get()==0:
        b20_1.invoke()
    if c20_2=='0' and b20_2var.get()==1:
        b20_2.invoke()
    if c20_2=='1' and b20_2var.get()==0:
        b20_2.invoke()
    if c20_3=='0' and b20_3var.get()==1:
        b20_3.invoke()
    if c20_3=='1' and b20_3var.get()==0:
        b20_3.invoke()
    if c20_4=='0' and b20_4var.get()==1:
        b20_4.invoke()
    if c20_4=='1' and b20_4var.get()==0:
        b20_4.invoke()
    if c20_5=='0' and b20_5var.get()==1:
        b20_5.invoke()
    if c20_5=='1' and b20_5var.get()==0:
        b20_5.invoke()
    if c20_6=='0' and b20_6var.get()==1:
        b20_6.invoke()
    if c20_6=='1' and b20_6var.get()==0:
        b20_6.invoke()
    if c20_7=='0' and b20_7var.get()==1:
        b20_7.invoke()
    if c20_7=='1' and b20_7var.get()==0:
        b20_7.invoke()
    if c20_8=='0' and b20_8var.get()==1:
        b20_8.invoke()
    if c20_8=='1' and b20_8var.get()==0:
        b20_8.invoke()
    if c20_9=='0' and b20_9var.get()==1:
        b20_9invoke()
    if c20_9=='1' and b20_9var.get()==0:
        b20_9.invoke()
    if c20_10=='0' and b20_10var.get()==1:
        b20_10.invoke()
    if c20_10=='1' and b20_10var.get()==0:
        b20_10.invoke()
    if c20_11=='0' and b20_11var.get()==1:
        b20_11.invoke()
    if c20_11=='1' and b20_11var.get()==0:
        b20_11.invoke()
    if c20_12=='0' and b20_12var.get()==1:
        b20_12.invoke()
    if c20_12=='1' and b20_12var.get()==0:
        b20_12.invoke()
    if c20_13=='0' and b20_13var.get()==1:
        b20_13.invoke()
    if c20_13=='1' and b20_13var.get()==0:
        b20_13.invoke()
    if c20_14=='0' and b20_14var.get()==1:
        b20_14.invoke()
    if c20_14=='1' and b20_14var.get()==0:
        b20_14.invoke()
    if c20_15=='0' and b20_15var.get()==1:
        b20_15.invoke()
    if c20_15=='1' and b20_15var.get()==0:
        b20_15.invoke()
    if c20_17=='0' and b20_17var.get()==1:
        b20_17.invoke()
    if c20_17=='1' and b20_17var.get()==0:
        b20_17.invoke()
    if tr_21=='1' and trig_21var.get()==0:
        trig_21.invoke()
        
    if c21_0=='0' and b21_0var.get()==1:
        b21_0.invoke()
    if c21_0=='1' and b21_0var.get()==0:
        b21_0.invoke()
    if c21_1=='0' and b21_1var.get()==1:
        b21_1.invoke()
    if c21_1=='1' and b21_1var.get()==0:
        b21_1.invoke()
    if c21_2=='0' and b21_2var.get()==1:
        b21_2.invoke()
    if c21_2=='1' and b21_2var.get()==0:
        b21_2.invoke()
    if c21_3=='0' and b21_3var.get()==1:
        b21_3.invoke()
    if c21_3=='1' and b21_3var.get()==0:
        b21_3.invoke()
    if c21_4=='0' and b21_4var.get()==1:
        b21_4.invoke()
    if c21_4=='1' and b21_4var.get()==0:
        b21_4.invoke()
    if c21_5=='0' and b21_5var.get()==1:
        b21_5.invoke()
    if c21_5=='1' and b21_5var.get()==0:
        b21_5.invoke()
    if c21_6=='0' and b21_6var.get()==1:
        b21_6.invoke()
    if c21_6=='1' and b21_6var.get()==0:
        b21_6.invoke()
    if c21_7=='0' and b21_7var.get()==1:
        b21_7.invoke()
    if c21_7=='1' and b21_7var.get()==0:
        b21_7.invoke()
    if c21_8=='0' and b21_8var.get()==1:
        b21_8.invoke()
    if c21_8=='1' and b21_8var.get()==0:
        b21_8.invoke()
    if c21_9=='0' and b21_9var.get()==1:
        b21_9invoke()
    if c21_9=='1' and b21_9var.get()==0:
        b21_9.invoke()
    if c21_10=='0' and b21_10var.get()==1:
        b21_10.invoke()
    if c21_10=='1' and b21_10var.get()==0:
        b21_10.invoke()
    if c21_11=='0' and b21_11var.get()==1:
        b21_11.invoke()
    if c21_11=='1' and b21_11var.get()==0:
        b21_11.invoke()
    if c21_12=='0' and b21_12var.get()==1:
        b21_12.invoke()
    if c21_12=='1' and b21_12var.get()==0:
        b21_12.invoke()
    if c21_13=='0' and b21_13var.get()==1:
        b21_13.invoke()
    if c21_13=='1' and b21_13var.get()==0:
        b21_13.invoke()
    if c21_14=='0' and b21_14var.get()==1:
        b21_14.invoke()
    if c21_14=='1' and b21_14var.get()==0:
        b21_14.invoke()
    if c21_15=='0' and b21_15var.get()==1:
        b21_15.invoke()
    if c21_15=='1' and b21_15var.get()==0:
        b21_15.invoke()
    if c21_17=='0' and b21_17var.get()==1:
        b21_17.invoke()
    if c21_17=='1' and b21_17var.get()==0:
        b21_17.invoke()
    if tr_22=='1' and trig_22var.get()==0:
        trig_22.invoke()
        
    if c22_0=='0' and b22_0var.get()==1:
        b22_0.invoke()
    if c22_0=='1' and b22_0var.get()==0:
        b22_0.invoke()
    if c22_1=='0' and b22_1var.get()==1:
        b22_1.invoke()
    if c22_1=='1' and b22_1var.get()==0:
        b22_1.invoke()
    if c22_2=='0' and b22_2var.get()==1:
        b22_2.invoke()
    if c22_2=='1' and b22_2var.get()==0:
        b22_2.invoke()
    if c22_3=='0' and b22_3var.get()==1:
        b22_3.invoke()
    if c22_3=='1' and b22_3var.get()==0:
        b22_3.invoke()
    if c22_4=='0' and b22_4var.get()==1:
        b22_4.invoke()
    if c22_4=='1' and b22_4var.get()==0:
        b22_4.invoke()
    if c22_5=='0' and b22_5var.get()==1:
        b22_5.invoke()
    if c22_5=='1' and b22_5var.get()==0:
        b22_5.invoke()
    if c22_6=='0' and b22_6var.get()==1:
        b22_6.invoke()
    if c22_6=='1' and b22_6var.get()==0:
        b22_6.invoke()
    if c22_7=='0' and b22_7var.get()==1:
        b22_7.invoke()
    if c22_7=='1' and b22_7var.get()==0:
        b22_7.invoke()
    if c22_8=='0' and b22_8var.get()==1:
        b22_8.invoke()
    if c22_8=='1' and b22_8var.get()==0:
        b22_8.invoke()
    if c22_9=='0' and b22_9var.get()==1:
        b22_9invoke()
    if c22_9=='1' and b22_9var.get()==0:
        b22_9.invoke()
    if c22_10=='0' and b22_10var.get()==1:
        b22_10.invoke()
    if c22_10=='1' and b22_10var.get()==0:
        b22_10.invoke()
    if c22_11=='0' and b22_11var.get()==1:
        b22_11.invoke()
    if c22_11=='1' and b22_11var.get()==0:
        b22_11.invoke()
    if c22_12=='0' and b22_12var.get()==1:
        b22_12.invoke()
    if c22_12=='1' and b22_12var.get()==0:
        b22_12.invoke()
    if c22_13=='0' and b22_13var.get()==1:
        b22_13.invoke()
    if c22_13=='1' and b22_13var.get()==0:
        b22_13.invoke()
    if c22_14=='0' and b22_14var.get()==1:
        b22_14.invoke()
    if c22_14=='1' and b22_14var.get()==0:
        b22_14.invoke()
    if c22_15=='0' and b22_15var.get()==1:
        b22_15.invoke()
    if c22_15=='1' and b22_15var.get()==0:
        b22_15.invoke()
    if c22_17=='0' and b22_17var.get()==1:
        b22_17.invoke()
    if c22_17=='1' and b22_17var.get()==0:
        b22_17.invoke()
    if tr_23=='1' and trig_23var.get()==0:
        trig_23.invoke()
        
    if c23_0=='0' and b23_0var.get()==1:
        b23_0.invoke()
    if c23_0=='1' and b23_0var.get()==0:
        b23_0.invoke()
    if c23_1=='0' and b23_1var.get()==1:
        b23_1.invoke()
    if c23_1=='1' and b23_1var.get()==0:
        b23_1.invoke()
    if c23_2=='0' and b23_2var.get()==1:
        b23_2.invoke()
    if c23_2=='1' and b23_2var.get()==0:
        b23_2.invoke()
    if c23_3=='0' and b23_3var.get()==1:
        b23_3.invoke()
    if c23_3=='1' and b23_3var.get()==0:
        b23_3.invoke()
    if c23_4=='0' and b23_4var.get()==1:
        b23_4.invoke()
    if c23_4=='1' and b23_4var.get()==0:
        b23_4.invoke()
    if c23_5=='0' and b23_5var.get()==1:
        b23_5.invoke()
    if c23_5=='1' and b23_5var.get()==0:
        b23_5.invoke()
    if c23_6=='0' and b23_6var.get()==1:
        b23_6.invoke()
    if c23_6=='1' and b23_6var.get()==0:
        b23_6.invoke()
    if c23_7=='0' and b23_7var.get()==1:
        b23_7.invoke()
    if c23_7=='1' and b23_7var.get()==0:
        b23_7.invoke()
    if c23_8=='0' and b23_8var.get()==1:
        b23_8.invoke()
    if c23_8=='1' and b23_8var.get()==0:
        b23_8.invoke()
    if c23_9=='0' and b23_9var.get()==1:
        b23_9invoke()
    if c23_9=='1' and b23_9var.get()==0:
        b23_9.invoke()
    if c23_10=='0' and b23_10var.get()==1:
        b23_10.invoke()
    if c23_10=='1' and b23_10var.get()==0:
        b23_10.invoke()
    if c23_11=='0' and b23_11var.get()==1:
        b23_11.invoke()
    if c23_11=='1' and b23_11var.get()==0:
        b23_11.invoke()
    if c23_12=='0' and b23_12var.get()==1:
        b23_12.invoke()
    if c23_12=='1' and b23_12var.get()==0:
        b23_12.invoke()
    if c23_13=='0' and b23_13var.get()==1:
        b23_13.invoke()
    if c23_13=='1' and b23_13var.get()==0:
        b23_13.invoke()
    if c23_14=='0' and b23_14var.get()==1:
        b23_14.invoke()
    if c23_14=='1' and b23_14var.get()==0:
        b23_14.invoke()
    if c23_15=='0' and b23_15var.get()==1:
        b23_15.invoke()
    if c23_15=='1' and b23_15var.get()==0:
        b23_15.invoke()
    if c23_17=='0' and b23_17var.get()==1:
        b23_17.invoke()
    if c23_17=='1' and b23_17var.get()==0:
        b23_17.invoke()
    if tr_24=='1' and trig_24var.get()==0:
        trig_24.invoke()
        
    if c24_0=='0' and b24_0var.get()==1:
        b24_0.invoke()
    if c24_0=='1' and b24_0var.get()==0:
        b24_0.invoke()
    if c24_1=='0' and b24_1var.get()==1:
        b24_1.invoke()
    if c24_1=='1' and b24_1var.get()==0:
        b24_1.invoke()
    if c24_2=='0' and b24_2var.get()==1:
        b24_2.invoke()
    if c24_2=='1' and b24_2var.get()==0:
        b24_2.invoke()
    if c24_3=='0' and b24_3var.get()==1:
        b24_3.invoke()
    if c24_3=='1' and b24_3var.get()==0:
        b24_3.invoke()
    if c24_4=='0' and b24_4var.get()==1:
        b24_4.invoke()
    if c24_4=='1' and b24_4var.get()==0:
        b24_4.invoke()
    if c24_5=='0' and b24_5var.get()==1:
        b24_5.invoke()
    if c24_5=='1' and b24_5var.get()==0:
        b24_5.invoke()
    if c24_6=='0' and b24_6var.get()==1:
        b24_6.invoke()
    if c24_6=='1' and b24_6var.get()==0:
        b24_6.invoke()
    if c24_7=='0' and b24_7var.get()==1:
        b24_7.invoke()
    if c24_7=='1' and b24_7var.get()==0:
        b24_7.invoke()
    if c24_8=='0' and b24_8var.get()==1:
        b24_8.invoke()
    if c24_8=='1' and b24_8var.get()==0:
        b24_8.invoke()
    if c24_9=='0' and b24_9var.get()==1:
        b24_9invoke()
    if c24_9=='1' and b24_9var.get()==0:
        b24_9.invoke()
    if c24_10=='0' and b24_10var.get()==1:
        b24_10.invoke()
    if c24_10=='1' and b24_10var.get()==0:
        b24_10.invoke()
    if c24_11=='0' and b24_11var.get()==1:
        b24_11.invoke()
    if c24_11=='1' and b24_11var.get()==0:
        b24_11.invoke()
    if c24_12=='0' and b24_12var.get()==1:
        b24_12.invoke()
    if c24_12=='1' and b24_12var.get()==0:
        b24_12.invoke()
    if c24_13=='0' and b24_13var.get()==1:
        b24_13.invoke()
    if c24_13=='1' and b24_13var.get()==0:
        b24_13.invoke()
    if c24_14=='0' and b24_14var.get()==1:
        b24_14.invoke()
    if c24_14=='1' and b24_14var.get()==0:
        b24_14.invoke()
    if c24_15=='0' and b24_15var.get()==1:
        b24_15.invoke()
    if c24_15=='1' and b24_15var.get()==0:
        b24_15.invoke()
    if c24_17=='0' and b24_17var.get()==1:
        b24_17.invoke()
    if c24_17=='1' and b24_17var.get()==0:
        b24_17.invoke()
    if tr_25=='1' and trig_25var.get()==0:
        trig_25.invoke()
        
    if c25_0=='0' and b25_0var.get()==1:
        b25_0.invoke()
    if c25_0=='1' and b25_0var.get()==0:
        b25_0.invoke()
    if c25_1=='0' and b25_1var.get()==1:
        b25_1.invoke()
    if c25_1=='1' and b25_1var.get()==0:
        b25_1.invoke()
    if c25_2=='0' and b25_2var.get()==1:
        b25_2.invoke()
    if c25_2=='1' and b25_2var.get()==0:
        b25_2.invoke()
    if c25_3=='0' and b25_3var.get()==1:
        b25_3.invoke()
    if c25_3=='1' and b25_3var.get()==0:
        b25_3.invoke()
    if c25_4=='0' and b25_4var.get()==1:
        b25_4.invoke()
    if c25_4=='1' and b25_4var.get()==0:
        b25_4.invoke()
    if c25_5=='0' and b25_5var.get()==1:
        b25_5.invoke()
    if c25_5=='1' and b25_5var.get()==0:
        b25_5.invoke()
    if c25_6=='0' and b25_6var.get()==1:
        b25_6.invoke()
    if c25_6=='1' and b25_6var.get()==0:
        b25_6.invoke()
    if c25_7=='0' and b25_7var.get()==1:
        b25_7.invoke()
    if c25_7=='1' and b25_7var.get()==0:
        b25_7.invoke()
    if c25_8=='0' and b25_8var.get()==1:
        b25_8.invoke()
    if c25_8=='1' and b25_8var.get()==0:
        b25_8.invoke()
    if c25_9=='0' and b25_9var.get()==1:
        b25_9invoke()
    if c25_9=='1' and b25_9var.get()==0:
        b25_9.invoke()
    if c25_10=='0' and b25_10var.get()==1:
        b25_10.invoke()
    if c25_10=='1' and b25_10var.get()==0:
        b25_10.invoke()
    if c25_11=='0' and b25_11var.get()==1:
        b25_11.invoke()
    if c25_11=='1' and b25_11var.get()==0:
        b25_11.invoke()
    if c25_12=='0' and b25_12var.get()==1:
        b25_12.invoke()
    if c25_12=='1' and b25_12var.get()==0:
        b25_12.invoke()
    if c25_13=='0' and b25_13var.get()==1:
        b25_13.invoke()
    if c25_13=='1' and b25_13var.get()==0:
        b25_13.invoke()
    if c25_14=='0' and b25_14var.get()==1:
        b25_14.invoke()
    if c25_14=='1' and b25_14var.get()==0:
        b25_14.invoke()
    if c25_15=='0' and b25_15var.get()==1:
        b25_15.invoke()
    if c25_15=='1' and b25_15var.get()==0:
        b25_15.invoke()
    if c25_17=='0' and b25_17var.get()==1:
        b25_17.invoke()
    if c25_17=='1' and b25_17var.get()==0:
        b25_17.invoke()
    if tr_26=='1' and trig_26var.get()==0:
        trig_26.invoke()
        
    if c26_0=='0' and b26_0var.get()==1:
        b26_0.invoke()
    if c26_0=='1' and b26_0var.get()==0:
        b26_0.invoke()
    if c26_1=='0' and b26_1var.get()==1:
        b26_1.invoke()
    if c26_1=='1' and b26_1var.get()==0:
        b26_1.invoke()
    if c26_2=='0' and b26_2var.get()==1:
        b26_2.invoke()
    if c26_2=='1' and b26_2var.get()==0:
        b26_2.invoke()
    if c26_3=='0' and b26_3var.get()==1:
        b26_3.invoke()
    if c26_3=='1' and b26_3var.get()==0:
        b26_3.invoke()
    if c26_4=='0' and b26_4var.get()==1:
        b26_4.invoke()
    if c26_4=='1' and b26_4var.get()==0:
        b26_4.invoke()
    if c26_5=='0' and b26_5var.get()==1:
        b26_5.invoke()
    if c26_5=='1' and b26_5var.get()==0:
        b26_5.invoke()
    if c26_6=='0' and b26_6var.get()==1:
        b26_6.invoke()
    if c26_6=='1' and b26_6var.get()==0:
        b26_6.invoke()
    if c26_7=='0' and b26_7var.get()==1:
        b26_7.invoke()
    if c26_7=='1' and b26_7var.get()==0:
        b26_7.invoke()
    if c26_8=='0' and b26_8var.get()==1:
        b26_8.invoke()
    if c26_8=='1' and b26_8var.get()==0:
        b26_8.invoke()
    if c26_9=='0' and b26_9var.get()==1:
        b26_9invoke()
    if c26_9=='1' and b26_9var.get()==0:
        b26_9.invoke()
    if c26_10=='0' and b26_10var.get()==1:
        b26_10.invoke()
    if c26_10=='1' and b26_10var.get()==0:
        b26_10.invoke()
    if c26_11=='0' and b26_11var.get()==1:
        b26_11.invoke()
    if c26_11=='1' and b26_11var.get()==0:
        b26_11.invoke()
    if c26_12=='0' and b26_12var.get()==1:
        b26_12.invoke()
    if c26_12=='1' and b26_12var.get()==0:
        b26_12.invoke()
    if c26_13=='0' and b26_13var.get()==1:
        b26_13.invoke()
    if c26_13=='1' and b26_13var.get()==0:
        b26_13.invoke()
    if c26_14=='0' and b26_14var.get()==1:
        b26_14.invoke()
    if c26_14=='1' and b26_14var.get()==0:
        b26_14.invoke()
    if c26_15=='0' and b26_15var.get()==1:
        b26_15.invoke()
    if c26_15=='1' and b26_15var.get()==0:
        b26_15.invoke()
    if c26_17=='0' and b26_17var.get()==1:
        b26_17.invoke()
    if c26_17=='1' and b26_17var.get()==0:
        b26_17.invoke()
    if tr_27=='1' and trig_27var.get()==0:
        trig_27.invoke()
        
    if c27_0=='0' and b27_0var.get()==1:
        b27_0.invoke()
    if c27_0=='1' and b27_0var.get()==0:
        b27_0.invoke()
    if c27_1=='0' and b27_1var.get()==1:
        b27_1.invoke()
    if c27_1=='1' and b27_1var.get()==0:
        b27_1.invoke()
    if c27_2=='0' and b27_2var.get()==1:
        b27_2.invoke()
    if c27_2=='1' and b27_2var.get()==0:
        b27_2.invoke()
    if c27_3=='0' and b27_3var.get()==1:
        b27_3.invoke()
    if c27_3=='1' and b27_3var.get()==0:
        b27_3.invoke()
    if c27_4=='0' and b27_4var.get()==1:
        b27_4.invoke()
    if c27_4=='1' and b27_4var.get()==0:
        b27_4.invoke()
    if c27_5=='0' and b27_5var.get()==1:
        b27_5.invoke()
    if c27_5=='1' and b27_5var.get()==0:
        b27_5.invoke()
    if c27_6=='0' and b27_6var.get()==1:
        b27_6.invoke()
    if c27_6=='1' and b27_6var.get()==0:
        b27_6.invoke()
    if c27_7=='0' and b27_7var.get()==1:
        b27_7.invoke()
    if c27_7=='1' and b27_7var.get()==0:
        b27_7.invoke()
    if c27_8=='0' and b27_8var.get()==1:
        b27_8.invoke()
    if c27_8=='1' and b27_8var.get()==0:
        b27_8.invoke()
    if c27_9=='0' and b27_9var.get()==1:
        b27_9invoke()
    if c27_9=='1' and b27_9var.get()==0:
        b27_9.invoke()
    if c27_10=='0' and b27_10var.get()==1:
        b27_10.invoke()
    if c27_10=='1' and b27_10var.get()==0:
        b27_10.invoke()
    if c27_11=='0' and b27_11var.get()==1:
        b27_11.invoke()
    if c27_11=='1' and b27_11var.get()==0:
        b27_11.invoke()
    if c27_12=='0' and b27_12var.get()==1:
        b27_12.invoke()
    if c27_12=='1' and b27_12var.get()==0:
        b27_12.invoke()
    if c27_13=='0' and b27_13var.get()==1:
        b27_13.invoke()
    if c27_13=='1' and b27_13var.get()==0:
        b27_13.invoke()
    if c27_14=='0' and b27_14var.get()==1:
        b27_14.invoke()
    if c27_14=='1' and b27_14var.get()==0:
        b27_14.invoke()
    if c27_15=='0' and b27_15var.get()==1:
        b27_15.invoke()
    if c27_15=='1' and b27_15var.get()==0:
        b27_15.invoke()
    if c27_17=='0' and b27_17var.get()==1:
        b27_17.invoke()
    if c27_17=='1' and b27_17var.get()==0:
        b27_17.invoke()
    if tr_28=='1' and trig_28var.get()==0:
        trig_28.invoke()
        
    if c28_0=='0' and b28_0var.get()==1:
        b28_0.invoke()
    if c28_0=='1' and b28_0var.get()==0:
        b28_0.invoke()
    if c28_1=='0' and b28_1var.get()==1:
        b28_1.invoke()
    if c28_1=='1' and b28_1var.get()==0:
        b28_1.invoke()
    if c28_2=='0' and b28_2var.get()==1:
        b28_2.invoke()
    if c28_2=='1' and b28_2var.get()==0:
        b28_2.invoke()
    if c28_3=='0' and b28_3var.get()==1:
        b28_3.invoke()
    if c28_3=='1' and b28_3var.get()==0:
        b28_3.invoke()
    if c28_4=='0' and b28_4var.get()==1:
        b28_4.invoke()
    if c28_4=='1' and b28_4var.get()==0:
        b28_4.invoke()
    if c28_5=='0' and b28_5var.get()==1:
        b28_5.invoke()
    if c28_5=='1' and b28_5var.get()==0:
        b28_5.invoke()
    if c28_6=='0' and b28_6var.get()==1:
        b28_6.invoke()
    if c28_6=='1' and b28_6var.get()==0:
        b28_6.invoke()
    if c28_7=='0' and b28_7var.get()==1:
        b28_7.invoke()
    if c28_7=='1' and b28_7var.get()==0:
        b28_7.invoke()
    if c28_8=='0' and b28_8var.get()==1:
        b28_8.invoke()
    if c28_8=='1' and b28_8var.get()==0:
        b28_8.invoke()
    if c28_9=='0' and b28_9var.get()==1:
        b28_9invoke()
    if c28_9=='1' and b28_9var.get()==0:
        b28_9.invoke()
    if c28_10=='0' and b28_10var.get()==1:
        b28_10.invoke()
    if c28_10=='1' and b28_10var.get()==0:
        b28_10.invoke()
    if c28_11=='0' and b28_11var.get()==1:
        b28_11.invoke()
    if c28_11=='1' and b28_11var.get()==0:
        b28_11.invoke()
    if c28_12=='0' and b28_12var.get()==1:
        b28_12.invoke()
    if c28_12=='1' and b28_12var.get()==0:
        b28_12.invoke()
    if c28_13=='0' and b28_13var.get()==1:
        b28_13.invoke()
    if c28_13=='1' and b28_13var.get()==0:
        b28_13.invoke()
    if c28_14=='0' and b28_14var.get()==1:
        b28_14.invoke()
    if c28_14=='1' and b28_14var.get()==0:
        b28_14.invoke()
    if c28_15=='0' and b28_15var.get()==1:
        b28_15.invoke()
    if c28_15=='1' and b28_15var.get()==0:
        b28_15.invoke()
    if c28_17=='0' and b28_17var.get()==1:
        b28_17.invoke()
    if c28_17=='1' and b28_17var.get()==0:
        b28_17.invoke()
    if tr_29=='1' and trig_29var.get()==0:
        trig_29.invoke()
        
    if c29_0=='0' and b29_0var.get()==1:
        b29_0.invoke()
    if c29_0=='1' and b29_0var.get()==0:
        b29_0.invoke()
    if c29_1=='0' and b29_1var.get()==1:
        b29_1.invoke()
    if c29_1=='1' and b29_1var.get()==0:
        b29_1.invoke()
    if c29_2=='0' and b29_2var.get()==1:
        b29_2.invoke()
    if c29_2=='1' and b29_2var.get()==0:
        b29_2.invoke()
    if c29_3=='0' and b29_3var.get()==1:
        b29_3.invoke()
    if c29_3=='1' and b29_3var.get()==0:
        b29_3.invoke()
    if c29_4=='0' and b29_4var.get()==1:
        b29_4.invoke()
    if c29_4=='1' and b29_4var.get()==0:
        b29_4.invoke()
    if c29_5=='0' and b29_5var.get()==1:
        b29_5.invoke()
    if c29_5=='1' and b29_5var.get()==0:
        b29_5.invoke()
    if c29_6=='0' and b29_6var.get()==1:
        b29_6.invoke()
    if c29_6=='1' and b29_6var.get()==0:
        b29_6.invoke()
    if c29_7=='0' and b29_7var.get()==1:
        b29_7.invoke()
    if c29_7=='1' and b29_7var.get()==0:
        b29_7.invoke()
    if c29_8=='0' and b29_8var.get()==1:
        b29_8.invoke()
    if c29_8=='1' and b29_8var.get()==0:
        b29_8.invoke()
    if c29_9=='0' and b29_9var.get()==1:
        b29_9invoke()
    if c29_9=='1' and b29_9var.get()==0:
        b29_9.invoke()
    if c29_10=='0' and b29_10var.get()==1:
        b29_10.invoke()
    if c29_10=='1' and b29_10var.get()==0:
        b29_10.invoke()
    if c29_11=='0' and b29_11var.get()==1:
        b29_11.invoke()
    if c29_11=='1' and b29_11var.get()==0:
        b29_11.invoke()
    if c29_12=='0' and b29_12var.get()==1:
        b29_12.invoke()
    if c29_12=='1' and b29_12var.get()==0:
        b29_12.invoke()
    if c29_13=='0' and b29_13var.get()==1:
        b29_13.invoke()
    if c29_13=='1' and b29_13var.get()==0:
        b29_13.invoke()
    if c29_14=='0' and b29_14var.get()==1:
        b29_14.invoke()
    if c29_14=='1' and b29_14var.get()==0:
        b29_14.invoke()
    if c29_15=='0' and b29_15var.get()==1:
        b29_15.invoke()
    if c29_15=='1' and b29_15var.get()==0:
        b29_15.invoke()
    if c29_17=='0' and b29_17var.get()==1:
        b29_17.invoke()
    if c29_17=='1' and b29_17var.get()==0:
        b29_17.invoke()
    if tr_30=='1' and trig_30var.get()==0:
        trig_30.invoke()
        
    if c30_0=='0' and b30_0var.get()==1:
        b30_0.invoke()
    if c30_0=='1' and b30_0var.get()==0:
        b30_0.invoke()
    if c30_1=='0' and b30_1var.get()==1:
        b30_1.invoke()
    if c30_1=='1' and b30_1var.get()==0:
        b30_1.invoke()
    if c30_2=='0' and b30_2var.get()==1:
        b30_2.invoke()
    if c30_2=='1' and b30_2var.get()==0:
        b30_2.invoke()
    if c30_3=='0' and b30_3var.get()==1:
        b30_3.invoke()
    if c30_3=='1' and b30_3var.get()==0:
        b30_3.invoke()
    if c30_4=='0' and b30_4var.get()==1:
        b30_4.invoke()
    if c30_4=='1' and b30_4var.get()==0:
        b30_4.invoke()
    if c30_5=='0' and b30_5var.get()==1:
        b30_5.invoke()
    if c30_5=='1' and b30_5var.get()==0:
        b30_5.invoke()
    if c30_6=='0' and b30_6var.get()==1:
        b30_6.invoke()
    if c30_6=='1' and b30_6var.get()==0:
        b30_6.invoke()
    if c30_7=='0' and b30_7var.get()==1:
        b30_7.invoke()
    if c30_7=='1' and b30_7var.get()==0:
        b30_7.invoke()
    if c30_8=='0' and b30_8var.get()==1:
        b30_8.invoke()
    if c30_8=='1' and b30_8var.get()==0:
        b30_8.invoke()
    if c30_9=='0' and b30_9var.get()==1:
        b30_9invoke()
    if c30_9=='1' and b30_9var.get()==0:
        b30_9.invoke()
    if c30_10=='0' and b30_10var.get()==1:
        b30_10.invoke()
    if c30_10=='1' and b30_10var.get()==0:
        b30_10.invoke()
    if c30_11=='0' and b30_11var.get()==1:
        b30_11.invoke()
    if c30_11=='1' and b30_11var.get()==0:
        b30_11.invoke()
    if c30_12=='0' and b30_12var.get()==1:
        b30_12.invoke()
    if c30_12=='1' and b30_12var.get()==0:
        b30_12.invoke()
    if c30_13=='0' and b30_13var.get()==1:
        b30_13.invoke()
    if c30_13=='1' and b30_13var.get()==0:
        b30_13.invoke()
    if c30_14=='0' and b30_14var.get()==1:
        b30_14.invoke()
    if c30_14=='1' and b30_14var.get()==0:
        b30_14.invoke()
    if c30_15=='0' and b30_15var.get()==1:
        b30_15.invoke()
    if c30_15=='1' and b30_15var.get()==0:
        b30_15.invoke()
    if c30_17=='0' and b30_17var.get()==1:
        b30_17.invoke()
    if c30_17=='1' and b30_17var.get()==0:
        b30_17.invoke()
    if tr_31=='1' and trig_31var.get()==0:
        trig_31.invoke()
       
    if c31_0=='0' and b31_0var.get()==1:
        b31_0.invoke()
    if c31_0=='1' and b31_0var.get()==0:
        b31_0.invoke()
    if c31_1=='0' and b31_1var.get()==1:
        b31_1.invoke()
    if c31_1=='1' and b31_1var.get()==0:
        b31_1.invoke()
    if c31_2=='0' and b31_2var.get()==1:
        b31_2.invoke()
    if c31_2=='1' and b31_2var.get()==0:
        b31_2.invoke()
    if c31_3=='0' and b31_3var.get()==1:
        b31_3.invoke()
    if c31_3=='1' and b31_3var.get()==0:
        b31_3.invoke()
    if c31_4=='0' and b31_4var.get()==1:
        b31_4.invoke()
    if c31_4=='1' and b31_4var.get()==0:
        b31_4.invoke()
    if c31_5=='0' and b31_5var.get()==1:
        b31_5.invoke()
    if c31_5=='1' and b31_5var.get()==0:
        b31_5.invoke()
    if c31_6=='0' and b31_6var.get()==1:
        b31_6.invoke()
    if c31_6=='1' and b31_6var.get()==0:
        b31_6.invoke()
    if c31_7=='0' and b31_7var.get()==1:
        b31_7.invoke()
    if c31_7=='1' and b31_7var.get()==0:
        b31_7.invoke()
    if c31_8=='0' and b31_8var.get()==1:
        b31_8.invoke()
    if c31_8=='1' and b31_8var.get()==0:
        b31_8.invoke()
    if c31_9=='0' and b31_9var.get()==1:
        b31_9invoke()
    if c31_9=='1' and b31_9var.get()==0:
        b31_9.invoke()
    if c31_10=='0' and b31_10var.get()==1:
        b31_10.invoke()
    if c31_10=='1' and b31_10var.get()==0:
        b31_10.invoke()
    if c31_11=='0' and b31_11var.get()==1:
        b31_11.invoke()
    if c31_11=='1' and b31_11var.get()==0:
        b31_11.invoke()
    if c31_12=='0' and b31_12var.get()==1:
        b31_12.invoke()
    if c31_12=='1' and b31_12var.get()==0:
        b31_12.invoke()
    if c31_13=='0' and b31_13var.get()==1:
        b31_13.invoke()
    if c31_13=='1' and b31_13var.get()==0:
        b31_13.invoke()
    if c31_14=='0' and b31_14var.get()==1:
        b31_14.invoke()
    if c31_14=='1' and b31_14var.get()==0:
        b31_14.invoke()
    if c31_15=='0' and b31_15var.get()==1:
        b31_15.invoke()
    if c31_15=='1' and b31_15var.get()==0:
        b31_15.invoke()
    if c31_17=='0' and b31_17var.get()==1:
        b31_17.invoke()
    if c31_17=='1' and b31_17var.get()==0:
        b31_17.invoke()
    if tr_32=='1' and trig_32var.get()==0:
        trig_32.invoke()
       
    if c32_0=='0' and b32_0var.get()==1:
        b32_0.invoke()
    if c32_0=='1' and b32_0var.get()==0:
        b32_0.invoke()
    if c32_1=='0' and b32_1var.get()==1:
        b32_1.invoke()
    if c32_1=='1' and b32_1var.get()==0:
        b32_1.invoke()
    if c32_2=='0' and b32_2var.get()==1:
        b32_2.invoke()
    if c32_2=='1' and b32_2var.get()==0:
        b32_2.invoke()
    if c32_3=='0' and b32_3var.get()==1:
        b32_3.invoke()
    if c32_3=='1' and b32_3var.get()==0:
        b32_3.invoke()
    if c32_4=='0' and b32_4var.get()==1:
        b32_4.invoke()
    if c32_4=='1' and b32_4var.get()==0:
        b32_4.invoke()
    if c32_5=='0' and b32_5var.get()==1:
        b32_5.invoke()
    if c32_5=='1' and b32_5var.get()==0:
        b32_5.invoke()
    if c32_6=='0' and b32_6var.get()==1:
        b32_6.invoke()
    if c32_6=='1' and b32_6var.get()==0:
        b32_6.invoke()
    if c32_7=='0' and b32_7var.get()==1:
        b32_7.invoke()
    if c32_7=='1' and b32_7var.get()==0:
        b32_7.invoke()
    if c32_8=='0' and b32_8var.get()==1:
        b32_8.invoke()
    if c32_8=='1' and b32_8var.get()==0:
        b32_8.invoke()
    if c32_9=='0' and b32_9var.get()==1:
        b32_9invoke()
    if c32_9=='1' and b32_9var.get()==0:
        b32_9.invoke()
    if c32_10=='0' and b32_10var.get()==1:
        b32_10.invoke()
    if c32_10=='1' and b32_10var.get()==0:
        b32_10.invoke()
    if c32_11=='0' and b32_11var.get()==1:
        b32_11.invoke()
    if c32_11=='1' and b32_11var.get()==0:
        b32_11.invoke()
    if c32_12=='0' and b32_12var.get()==1:
        b32_12.invoke()
    if c32_12=='1' and b32_12var.get()==0:
        b32_12.invoke()
    if c32_13=='0' and b32_13var.get()==1:
        b32_13.invoke()
    if c32_13=='1' and b32_13var.get()==0:
        b32_13.invoke()
    if c32_14=='0' and b32_14var.get()==1:
        b32_14.invoke()
    if c32_14=='1' and b32_14var.get()==0:
        b32_14.invoke()
    if c32_15=='0' and b32_15var.get()==1:
        b32_15.invoke()
    if c32_15=='1' and b32_15var.get()==0:
        b32_15.invoke()
    if c32_17=='0' and b32_17var.get()==1:
        b32_17.invoke()
    if c32_17=='1' and b32_17var.get()==0:
        b32_17.invoke()
    if tr_33=='1' and trig_33var.get()==0:
        trig_33.invoke()
       
    if c33_0=='0' and b33_0var.get()==1:
        b33_0.invoke()
    if c33_0=='1' and b33_0var.get()==0:
        b33_0.invoke()
    if c33_1=='0' and b33_1var.get()==1:
        b33_1.invoke()
    if c33_1=='1' and b33_1var.get()==0:
        b33_1.invoke()
    if c33_2=='0' and b33_2var.get()==1:
        b33_2.invoke()
    if c33_2=='1' and b33_2var.get()==0:
        b33_2.invoke()
    if c33_3=='0' and b33_3var.get()==1:
        b33_3.invoke()
    if c33_3=='1' and b33_3var.get()==0:
        b33_3.invoke()
    if c33_4=='0' and b33_4var.get()==1:
        b33_4.invoke()
    if c33_4=='1' and b33_4var.get()==0:
        b33_4.invoke()
    if c33_5=='0' and b33_5var.get()==1:
        b33_5.invoke()
    if c33_5=='1' and b33_5var.get()==0:
        b33_5.invoke()
    if c33_6=='0' and b33_6var.get()==1:
        b33_6.invoke()
    if c33_6=='1' and b33_6var.get()==0:
        b33_6.invoke()
    if c33_7=='0' and b33_7var.get()==1:
        b33_7.invoke()
    if c33_7=='1' and b33_7var.get()==0:
        b33_7.invoke()
    if c33_8=='0' and b33_8var.get()==1:
        b33_8.invoke()
    if c33_8=='1' and b33_8var.get()==0:
        b33_8.invoke()
    if c33_9=='0' and b33_9var.get()==1:
        b33_9invoke()
    if c33_9=='1' and b33_9var.get()==0:
        b33_9.invoke()
    if c33_10=='0' and b33_10var.get()==1:
        b33_10.invoke()
    if c33_10=='1' and b33_10var.get()==0:
        b33_10.invoke()
    if c33_11=='0' and b33_11var.get()==1:
        b33_11.invoke()
    if c33_11=='1' and b33_11var.get()==0:
        b33_11.invoke()
    if c33_12=='0' and b33_12var.get()==1:
        b33_12.invoke()
    if c33_12=='1' and b33_12var.get()==0:
        b33_12.invoke()
    if c33_13=='0' and b33_13var.get()==1:
        b33_13.invoke()
    if c33_13=='1' and b33_13var.get()==0:
        b33_13.invoke()
    if c33_14=='0' and b33_14var.get()==1:
        b33_14.invoke()
    if c33_14=='1' and b33_14var.get()==0:
        b33_14.invoke()
    if c33_15=='0' and b33_15var.get()==1:
        b33_15.invoke()
    if c33_15=='1' and b33_15var.get()==0:
        b33_15.invoke()
    if c33_17=='0' and b33_17var.get()==1:
        b33_17.invoke()
    if c33_17=='1' and b33_17var.get()==0:
        b33_17.invoke()
    if tr_34=='1' and trig_34var.get()==0:
        trig_34.invoke()
       
    if c34_0=='0' and b34_0var.get()==1:
        b34_0.invoke()
    if c34_0=='1' and b34_0var.get()==0:
        b34_0.invoke()
    if c34_1=='0' and b34_1var.get()==1:
        b34_1.invoke()
    if c34_1=='1' and b34_1var.get()==0:
        b34_1.invoke()
    if c34_2=='0' and b34_2var.get()==1:
        b34_2.invoke()
    if c34_2=='1' and b34_2var.get()==0:
        b34_2.invoke()
    if c34_3=='0' and b34_3var.get()==1:
        b34_3.invoke()
    if c34_3=='1' and b34_3var.get()==0:
        b34_3.invoke()
    if c34_4=='0' and b34_4var.get()==1:
        b34_4.invoke()
    if c34_4=='1' and b34_4var.get()==0:
        b34_4.invoke()
    if c34_5=='0' and b34_5var.get()==1:
        b34_5.invoke()
    if c34_5=='1' and b34_5var.get()==0:
        b34_5.invoke()
    if c34_6=='0' and b34_6var.get()==1:
        b34_6.invoke()
    if c34_6=='1' and b34_6var.get()==0:
        b34_6.invoke()
    if c34_7=='0' and b34_7var.get()==1:
        b34_7.invoke()
    if c34_7=='1' and b34_7var.get()==0:
        b34_7.invoke()
    if c34_8=='0' and b34_8var.get()==1:
        b34_8.invoke()
    if c34_8=='1' and b34_8var.get()==0:
        b34_8.invoke()
    if c34_9=='0' and b34_9var.get()==1:
        b34_9invoke()
    if c34_9=='1' and b34_9var.get()==0:
        b34_9.invoke()
    if c34_10=='0' and b34_10var.get()==1:
        b34_10.invoke()
    if c34_10=='1' and b34_10var.get()==0:
        b34_10.invoke()
    if c34_11=='0' and b34_11var.get()==1:
        b34_11.invoke()
    if c34_11=='1' and b34_11var.get()==0:
        b34_11.invoke()
    if c34_12=='0' and b34_12var.get()==1:
        b34_12.invoke()
    if c34_12=='1' and b34_12var.get()==0:
        b34_12.invoke()
    if c34_13=='0' and b34_13var.get()==1:
        b34_13.invoke()
    if c34_13=='1' and b34_13var.get()==0:
        b34_13.invoke()
    if c34_14=='0' and b34_14var.get()==1:
        b34_14.invoke()
    if c34_14=='1' and b34_14var.get()==0:
        b34_14.invoke()
    if c34_15=='0' and b34_15var.get()==1:
        b34_15.invoke()
    if c34_15=='1' and b34_15var.get()==0:
        b34_15.invoke()
    if c34_17=='0' and b34_17var.get()==1:
        b34_17.invoke()
    if c34_17=='1' and b34_17var.get()==0:
        b34_17.invoke()
    if tr_35=='1' and trig_35var.get()==0:
        trig_35.invoke()
       
    if c35_0=='0' and b35_0var.get()==1:
        b35_0.invoke()
    if c35_0=='1' and b35_0var.get()==0:
        b35_0.invoke()
    if c35_1=='0' and b35_1var.get()==1:
        b35_1.invoke()
    if c35_1=='1' and b35_1var.get()==0:
        b35_1.invoke()
    if c35_2=='0' and b35_2var.get()==1:
        b35_2.invoke()
    if c35_2=='1' and b35_2var.get()==0:
        b35_2.invoke()
    if c35_3=='0' and b35_3var.get()==1:
        b35_3.invoke()
    if c35_3=='1' and b35_3var.get()==0:
        b35_3.invoke()
    if c35_4=='0' and b35_4var.get()==1:
        b35_4.invoke()
    if c35_4=='1' and b35_4var.get()==0:
        b35_4.invoke()
    if c35_5=='0' and b35_5var.get()==1:
        b35_5.invoke()
    if c35_5=='1' and b35_5var.get()==0:
        b35_5.invoke()
    if c35_6=='0' and b35_6var.get()==1:
        b35_6.invoke()
    if c35_6=='1' and b35_6var.get()==0:
        b35_6.invoke()
    if c35_7=='0' and b35_7var.get()==1:
        b35_7.invoke()
    if c35_7=='1' and b35_7var.get()==0:
        b35_7.invoke()
    if c35_8=='0' and b35_8var.get()==1:
        b35_8.invoke()
    if c35_8=='1' and b35_8var.get()==0:
        b35_8.invoke()
    if c35_9=='0' and b35_9var.get()==1:
        b35_9invoke()
    if c35_9=='1' and b35_9var.get()==0:
        b35_9.invoke()
    if c35_10=='0' and b35_10var.get()==1:
        b35_10.invoke()
    if c35_10=='1' and b35_10var.get()==0:
        b35_10.invoke()
    if c35_11=='0' and b35_11var.get()==1:
        b35_11.invoke()
    if c35_11=='1' and b35_11var.get()==0:
        b35_11.invoke()
    if c35_12=='0' and b35_12var.get()==1:
        b35_12.invoke()
    if c35_12=='1' and b35_12var.get()==0:
        b35_12.invoke()
    if c35_13=='0' and b35_13var.get()==1:
        b35_13.invoke()
    if c35_13=='1' and b35_13var.get()==0:
        b35_13.invoke()
    if c35_14=='0' and b35_14var.get()==1:
        b35_14.invoke()
    if c35_14=='1' and b35_14var.get()==0:
        b35_14.invoke()
    if c35_15=='0' and b35_15var.get()==1:
        b35_15.invoke()
    if c35_15=='1' and b35_15var.get()==0:
        b35_15.invoke()
    if c35_17=='0' and b35_17var.get()==1:
        b35_17.invoke()
    if c35_17=='1' and b35_17var.get()==0:
        b35_17.invoke()
    if tr_36=='1' and trig_36var.get()==0:
        trig_36.invoke()
       
    if c36_0=='0' and b36_0var.get()==1:
        b36_0.invoke()
    if c36_0=='1' and b36_0var.get()==0:
        b36_0.invoke()
    if c36_1=='0' and b36_1var.get()==1:
        b36_1.invoke()
    if c36_1=='1' and b36_1var.get()==0:
        b36_1.invoke()
    if c36_2=='0' and b36_2var.get()==1:
        b36_2.invoke()
    if c36_2=='1' and b36_2var.get()==0:
        b36_2.invoke()
    if c36_3=='0' and b36_3var.get()==1:
        b36_3.invoke()
    if c36_3=='1' and b36_3var.get()==0:
        b36_3.invoke()
    if c36_4=='0' and b36_4var.get()==1:
        b36_4.invoke()
    if c36_4=='1' and b36_4var.get()==0:
        b36_4.invoke()
    if c36_5=='0' and b36_5var.get()==1:
        b36_5.invoke()
    if c36_5=='1' and b36_5var.get()==0:
        b36_5.invoke()
    if c36_6=='0' and b36_6var.get()==1:
        b36_6.invoke()
    if c36_6=='1' and b36_6var.get()==0:
        b36_6.invoke()
    if c36_7=='0' and b36_7var.get()==1:
        b36_7.invoke()
    if c36_7=='1' and b36_7var.get()==0:
        b36_7.invoke()
    if c36_8=='0' and b36_8var.get()==1:
        b36_8.invoke()
    if c36_8=='1' and b36_8var.get()==0:
        b36_8.invoke()
    if c36_9=='0' and b36_9var.get()==1:
        b36_9invoke()
    if c36_9=='1' and b36_9var.get()==0:
        b36_9.invoke()
    if c36_10=='0' and b36_10var.get()==1:
        b36_10.invoke()
    if c36_10=='1' and b36_10var.get()==0:
        b36_10.invoke()
    if c36_11=='0' and b36_11var.get()==1:
        b36_11.invoke()
    if c36_11=='1' and b36_11var.get()==0:
        b36_11.invoke()
    if c36_12=='0' and b36_12var.get()==1:
        b36_12.invoke()
    if c36_12=='1' and b36_12var.get()==0:
        b36_12.invoke()
    if c36_13=='0' and b36_13var.get()==1:
        b36_13.invoke()
    if c36_13=='1' and b36_13var.get()==0:
        b36_13.invoke()
    if c36_14=='0' and b36_14var.get()==1:
        b36_14.invoke()
    if c36_14=='1' and b36_14var.get()==0:
        b36_14.invoke()
    if c36_15=='0' and b36_15var.get()==1:
        b36_15.invoke()
    if c36_15=='1' and b36_15var.get()==0:
        b36_15.invoke()
    if c36_17=='0' and b36_17var.get()==1:
        b36_17.invoke()
    if c36_17=='1' and b36_17var.get()==0:
        b36_17.invoke()
    if tr_37=='1' and trig_37var.get()==0:
        trig_37.invoke()
       
    if c37_0=='0' and b37_0var.get()==1:
        b37_0.invoke()
    if c37_0=='1' and b37_0var.get()==0:
        b37_0.invoke()
    if c37_1=='0' and b37_1var.get()==1:
        b37_1.invoke()
    if c37_1=='1' and b37_1var.get()==0:
        b37_1.invoke()
    if c37_2=='0' and b37_2var.get()==1:
        b37_2.invoke()
    if c37_2=='1' and b37_2var.get()==0:
        b37_2.invoke()
    if c37_3=='0' and b37_3var.get()==1:
        b37_3.invoke()
    if c37_3=='1' and b37_3var.get()==0:
        b37_3.invoke()
    if c37_4=='0' and b37_4var.get()==1:
        b37_4.invoke()
    if c37_4=='1' and b37_4var.get()==0:
        b37_4.invoke()
    if c37_5=='0' and b37_5var.get()==1:
        b37_5.invoke()
    if c37_5=='1' and b37_5var.get()==0:
        b37_5.invoke()
    if c37_6=='0' and b37_6var.get()==1:
        b37_6.invoke()
    if c37_6=='1' and b37_6var.get()==0:
        b37_6.invoke()
    if c37_7=='0' and b37_7var.get()==1:
        b37_7.invoke()
    if c37_7=='1' and b37_7var.get()==0:
        b37_7.invoke()
    if c37_8=='0' and b37_8var.get()==1:
        b37_8.invoke()
    if c37_8=='1' and b37_8var.get()==0:
        b37_8.invoke()
    if c37_9=='0' and b37_9var.get()==1:
        b37_9invoke()
    if c37_9=='1' and b37_9var.get()==0:
        b37_9.invoke()
    if c37_10=='0' and b37_10var.get()==1:
        b37_10.invoke()
    if c37_10=='1' and b37_10var.get()==0:
        b37_10.invoke()
    if c37_11=='0' and b37_11var.get()==1:
        b37_11.invoke()
    if c37_11=='1' and b37_11var.get()==0:
        b37_11.invoke()
    if c37_12=='0' and b37_12var.get()==1:
        b37_12.invoke()
    if c37_12=='1' and b37_12var.get()==0:
        b37_12.invoke()
    if c37_13=='0' and b37_13var.get()==1:
        b37_13.invoke()
    if c37_13=='1' and b37_13var.get()==0:
        b37_13.invoke()
    if c37_14=='0' and b37_14var.get()==1:
        b37_14.invoke()
    if c37_14=='1' and b37_14var.get()==0:
        b37_14.invoke()
    if c37_15=='0' and b37_15var.get()==1:
        b37_15.invoke()
    if c37_15=='1' and b37_15var.get()==0:
        b37_15.invoke()
    if c37_17=='0' and b37_17var.get()==1:
        b37_17.invoke()
    if c37_17=='1' and b37_17var.get()==0:
        b37_17.invoke()
    if tr_38=='1' and trig_38var.get()==0:
        trig_38.invoke()
       
    if c38_0=='0' and b38_0var.get()==1:
        b38_0.invoke()
    if c38_0=='1' and b38_0var.get()==0:
        b38_0.invoke()
    if c38_1=='0' and b38_1var.get()==1:
        b38_1.invoke()
    if c38_1=='1' and b38_1var.get()==0:
        b38_1.invoke()
    if c38_2=='0' and b38_2var.get()==1:
        b38_2.invoke()
    if c38_2=='1' and b38_2var.get()==0:
        b38_2.invoke()
    if c38_3=='0' and b38_3var.get()==1:
        b38_3.invoke()
    if c38_3=='1' and b38_3var.get()==0:
        b38_3.invoke()
    if c38_4=='0' and b38_4var.get()==1:
        b38_4.invoke()
    if c38_4=='1' and b38_4var.get()==0:
        b38_4.invoke()
    if c38_5=='0' and b38_5var.get()==1:
        b38_5.invoke()
    if c38_5=='1' and b38_5var.get()==0:
        b38_5.invoke()
    if c38_6=='0' and b38_6var.get()==1:
        b38_6.invoke()
    if c38_6=='1' and b38_6var.get()==0:
        b38_6.invoke()
    if c38_7=='0' and b38_7var.get()==1:
        b38_7.invoke()
    if c38_7=='1' and b38_7var.get()==0:
        b38_7.invoke()
    if c38_8=='0' and b38_8var.get()==1:
        b38_8.invoke()
    if c38_8=='1' and b38_8var.get()==0:
        b38_8.invoke()
    if c38_9=='0' and b38_9var.get()==1:
        b38_9invoke()
    if c38_9=='1' and b38_9var.get()==0:
        b38_9.invoke()
    if c38_10=='0' and b38_10var.get()==1:
        b38_10.invoke()
    if c38_10=='1' and b38_10var.get()==0:
        b38_10.invoke()
    if c38_11=='0' and b38_11var.get()==1:
        b38_11.invoke()
    if c38_11=='1' and b38_11var.get()==0:
        b38_11.invoke()
    if c38_12=='0' and b38_12var.get()==1:
        b38_12.invoke()
    if c38_12=='1' and b38_12var.get()==0:
        b38_12.invoke()
    if c38_13=='0' and b38_13var.get()==1:
        b38_13.invoke()
    if c38_13=='1' and b38_13var.get()==0:
        b38_13.invoke()
    if c38_14=='0' and b38_14var.get()==1:
        b38_14.invoke()
    if c38_14=='1' and b38_14var.get()==0:
        b38_14.invoke()
    if c38_15=='0' and b38_15var.get()==1:
        b38_15.invoke()
    if c38_15=='1' and b38_15var.get()==0:
        b38_15.invoke()
    if c38_17=='0' and b38_17var.get()==1:
        b38_17.invoke()
    if c38_17=='1' and b38_17var.get()==0:
        b38_17.invoke()
    if tr_39=='1' and trig_39var.get()==0:
        trig_39.invoke()
       
    if c39_0=='0' and b39_0var.get()==1:
        b39_0.invoke()
    if c39_0=='1' and b39_0var.get()==0:
        b39_0.invoke()
    if c39_1=='0' and b39_1var.get()==1:
        b39_1.invoke()
    if c39_1=='1' and b39_1var.get()==0:
        b39_1.invoke()
    if c39_2=='0' and b39_2var.get()==1:
        b39_2.invoke()
    if c39_2=='1' and b39_2var.get()==0:
        b39_2.invoke()
    if c39_3=='0' and b39_3var.get()==1:
        b39_3.invoke()
    if c39_3=='1' and b39_3var.get()==0:
        b39_3.invoke()
    if c39_4=='0' and b39_4var.get()==1:
        b39_4.invoke()
    if c39_4=='1' and b39_4var.get()==0:
        b39_4.invoke()
    if c39_5=='0' and b39_5var.get()==1:
        b39_5.invoke()
    if c39_5=='1' and b39_5var.get()==0:
        b39_5.invoke()
    if c39_6=='0' and b39_6var.get()==1:
        b39_6.invoke()
    if c39_6=='1' and b39_6var.get()==0:
        b39_6.invoke()
    if c39_7=='0' and b39_7var.get()==1:
        b39_7.invoke()
    if c39_7=='1' and b39_7var.get()==0:
        b39_7.invoke()
    if c39_8=='0' and b39_8var.get()==1:
        b39_8.invoke()
    if c39_8=='1' and b39_8var.get()==0:
        b39_8.invoke()
    if c39_9=='0' and b39_9var.get()==1:
        b39_9invoke()
    if c39_9=='1' and b39_9var.get()==0:
        b39_9.invoke()
    if c39_10=='0' and b39_10var.get()==1:
        b39_10.invoke()
    if c39_10=='1' and b39_10var.get()==0:
        b39_10.invoke()
    if c39_11=='0' and b39_11var.get()==1:
        b39_11.invoke()
    if c39_11=='1' and b39_11var.get()==0:
        b39_11.invoke()
    if c39_12=='0' and b39_12var.get()==1:
        b39_12.invoke()
    if c39_12=='1' and b39_12var.get()==0:
        b39_12.invoke()
    if c39_13=='0' and b39_13var.get()==1:
        b39_13.invoke()
    if c39_13=='1' and b39_13var.get()==0:
        b39_13.invoke()
    if c39_14=='0' and b39_14var.get()==1:
        b39_14.invoke()
    if c39_14=='1' and b39_14var.get()==0:
        b39_14.invoke()
    if c39_15=='0' and b39_15var.get()==1:
        b39_15.invoke()
    if c39_15=='1' and b39_15var.get()==0:
        b39_15.invoke()
    if c39_17=='0' and b39_17var.get()==1:
        b39_17.invoke()
    if c39_17=='1' and b39_17var.get()==0:
        b39_17.invoke()
    if tr_40=='1' and trig_40var.get()==0:
        trig_40.invoke()
       
    if c40_0=='0' and b40_0var.get()==1:
        b40_0.invoke()
    if c40_0=='1' and b40_0var.get()==0:
        b40_0.invoke()
    if c40_1=='0' and b40_1var.get()==1:
        b40_1.invoke()
    if c40_1=='1' and b40_1var.get()==0:
        b40_1.invoke()
    if c40_2=='0' and b40_2var.get()==1:
        b40_2.invoke()
    if c40_2=='1' and b40_2var.get()==0:
        b40_2.invoke()
    if c40_3=='0' and b40_3var.get()==1:
        b40_3.invoke()
    if c40_3=='1' and b40_3var.get()==0:
        b40_3.invoke()
    if c40_4=='0' and b40_4var.get()==1:
        b40_4.invoke()
    if c40_4=='1' and b40_4var.get()==0:
        b40_4.invoke()
    if c40_5=='0' and b40_5var.get()==1:
        b40_5.invoke()
    if c40_5=='1' and b40_5var.get()==0:
        b40_5.invoke()
    if c40_6=='0' and b40_6var.get()==1:
        b40_6.invoke()
    if c40_6=='1' and b40_6var.get()==0:
        b40_6.invoke()
    if c40_7=='0' and b40_7var.get()==1:
        b40_7.invoke()
    if c40_7=='1' and b40_7var.get()==0:
        b40_7.invoke()
    if c40_8=='0' and b40_8var.get()==1:
        b40_8.invoke()
    if c40_8=='1' and b40_8var.get()==0:
        b40_8.invoke()
    if c40_9=='0' and b40_9var.get()==1:
        b40_9invoke()
    if c40_9=='1' and b40_9var.get()==0:
        b40_9.invoke()
    if c40_10=='0' and b40_10var.get()==1:
        b40_10.invoke()
    if c40_10=='1' and b40_10var.get()==0:
        b40_10.invoke()
    if c40_11=='0' and b40_11var.get()==1:
        b40_11.invoke()
    if c40_11=='1' and b40_11var.get()==0:
        b40_11.invoke()
    if c40_12=='0' and b40_12var.get()==1:
        b40_12.invoke()
    if c40_12=='1' and b40_12var.get()==0:
        b40_12.invoke()
    if c40_13=='0' and b40_13var.get()==1:
        b40_13.invoke()
    if c40_13=='1' and b40_13var.get()==0:
        b40_13.invoke()
    if c40_14=='0' and b40_14var.get()==1:
        b40_14.invoke()
    if c40_14=='1' and b40_14var.get()==0:
        b40_14.invoke()
    if c40_15=='0' and b40_15var.get()==1:
        b40_15.invoke()
    if c40_15=='1' and b40_15var.get()==0:
        b40_15.invoke()
    if c40_17=='0' and b40_17var.get()==1:
        b40_17.invoke()
    if c40_17=='1' and b40_17var.get()==0:
        b40_17.invoke()
    if tr_41=='1' and trig_41var.get()==0:
        trig_41.invoke()
       
    if c41_0=='0' and b41_0var.get()==1:
        b41_0.invoke()
    if c41_0=='1' and b41_0var.get()==0:
        b41_0.invoke()
    if c41_1=='0' and b41_1var.get()==1:
        b41_1.invoke()
    if c41_1=='1' and b41_1var.get()==0:
        b41_1.invoke()
    if c41_2=='0' and b41_2var.get()==1:
        b41_2.invoke()
    if c41_2=='1' and b41_2var.get()==0:
        b41_2.invoke()
    if c41_3=='0' and b41_3var.get()==1:
        b41_3.invoke()
    if c41_3=='1' and b41_3var.get()==0:
        b41_3.invoke()
    if c41_4=='0' and b41_4var.get()==1:
        b41_4.invoke()
    if c41_4=='1' and b41_4var.get()==0:
        b41_4.invoke()
    if c41_5=='0' and b41_5var.get()==1:
        b41_5.invoke()
    if c41_5=='1' and b41_5var.get()==0:
        b41_5.invoke()
    if c41_6=='0' and b41_6var.get()==1:
        b41_6.invoke()
    if c41_6=='1' and b41_6var.get()==0:
        b41_6.invoke()
    if c41_7=='0' and b41_7var.get()==1:
        b41_7.invoke()
    if c41_7=='1' and b41_7var.get()==0:
        b41_7.invoke()
    if c41_8=='0' and b41_8var.get()==1:
        b41_8.invoke()
    if c41_8=='1' and b41_8var.get()==0:
        b41_8.invoke()
    if c41_9=='0' and b41_9var.get()==1:
        b41_9invoke()
    if c41_9=='1' and b41_9var.get()==0:
        b41_9.invoke()
    if c41_10=='0' and b41_10var.get()==1:
        b41_10.invoke()
    if c41_10=='1' and b41_10var.get()==0:
        b41_10.invoke()
    if c41_11=='0' and b41_11var.get()==1:
        b41_11.invoke()
    if c41_11=='1' and b41_11var.get()==0:
        b41_11.invoke()
    if c41_12=='0' and b41_12var.get()==1:
        b41_12.invoke()
    if c41_12=='1' and b41_12var.get()==0:
        b41_12.invoke()
    if c41_13=='0' and b41_13var.get()==1:
        b41_13.invoke()
    if c41_13=='1' and b41_13var.get()==0:
        b41_13.invoke()
    if c41_14=='0' and b41_14var.get()==1:
        b41_14.invoke()
    if c41_14=='1' and b41_14var.get()==0:
        b41_14.invoke()
    if c41_15=='0' and b41_15var.get()==1:
        b41_15.invoke()
    if c41_15=='1' and b41_15var.get()==0:
        b41_15.invoke()
    if c41_17=='0' and b41_17var.get()==1:
        b41_17.invoke()
    if c41_17=='1' and b41_17var.get()==0:
        b41_17.invoke()
    if tr_42=='1' and trig_42var.get()==0:
        trig_42.invoke()
       
    if c42_0=='0' and b42_0var.get()==1:
        b42_0.invoke()
    if c42_0=='1' and b42_0var.get()==0:
        b42_0.invoke()
    if c42_1=='0' and b42_1var.get()==1:
        b42_1.invoke()
    if c42_1=='1' and b42_1var.get()==0:
        b42_1.invoke()
    if c42_2=='0' and b42_2var.get()==1:
        b42_2.invoke()
    if c42_2=='1' and b42_2var.get()==0:
        b42_2.invoke()
    if c42_3=='0' and b42_3var.get()==1:
        b42_3.invoke()
    if c42_3=='1' and b42_3var.get()==0:
        b42_3.invoke()
    if c42_4=='0' and b42_4var.get()==1:
        b42_4.invoke()
    if c42_4=='1' and b42_4var.get()==0:
        b42_4.invoke()
    if c42_5=='0' and b42_5var.get()==1:
        b42_5.invoke()
    if c42_5=='1' and b42_5var.get()==0:
        b42_5.invoke()
    if c42_6=='0' and b42_6var.get()==1:
        b42_6.invoke()
    if c42_6=='1' and b42_6var.get()==0:
        b42_6.invoke()
    if c42_7=='0' and b42_7var.get()==1:
        b42_7.invoke()
    if c42_7=='1' and b42_7var.get()==0:
        b42_7.invoke()
    if c42_8=='0' and b42_8var.get()==1:
        b42_8.invoke()
    if c42_8=='1' and b42_8var.get()==0:
        b42_8.invoke()
    if c42_9=='0' and b42_9var.get()==1:
        b42_9invoke()
    if c42_9=='1' and b42_9var.get()==0:
        b42_9.invoke()
    if c42_10=='0' and b42_10var.get()==1:
        b42_10.invoke()
    if c42_10=='1' and b42_10var.get()==0:
        b42_10.invoke()
    if c42_11=='0' and b42_11var.get()==1:
        b42_11.invoke()
    if c42_11=='1' and b42_11var.get()==0:
        b42_11.invoke()
    if c42_12=='0' and b42_12var.get()==1:
        b42_12.invoke()
    if c42_12=='1' and b42_12var.get()==0:
        b42_12.invoke()
    if c42_13=='0' and b42_13var.get()==1:
        b42_13.invoke()
    if c42_13=='1' and b42_13var.get()==0:
        b42_13.invoke()
    if c42_14=='0' and b42_14var.get()==1:
        b42_14.invoke()
    if c42_14=='1' and b42_14var.get()==0:
        b42_14.invoke()
    if c42_15=='0' and b42_15var.get()==1:
        b42_15.invoke()
    if c42_15=='1' and b42_15var.get()==0:
        b42_15.invoke()
    if c42_17=='0' and b42_17var.get()==1:
        b42_17.invoke()
    if c42_17=='1' and b42_17var.get()==0:
        b42_17.invoke()
    if tr_43=='1' and trig_43var.get()==0:
        trig_43.invoke()
       
    if c43_0=='0' and b43_0var.get()==1:
        b43_0.invoke()
    if c43_0=='1' and b43_0var.get()==0:
        b43_0.invoke()
    if c43_1=='0' and b43_1var.get()==1:
        b43_1.invoke()
    if c43_1=='1' and b43_1var.get()==0:
        b43_1.invoke()
    if c43_2=='0' and b43_2var.get()==1:
        b43_2.invoke()
    if c43_2=='1' and b43_2var.get()==0:
        b43_2.invoke()
    if c43_3=='0' and b43_3var.get()==1:
        b43_3.invoke()
    if c43_3=='1' and b43_3var.get()==0:
        b43_3.invoke()
    if c43_4=='0' and b43_4var.get()==1:
        b43_4.invoke()
    if c43_4=='1' and b43_4var.get()==0:
        b43_4.invoke()
    if c43_5=='0' and b43_5var.get()==1:
        b43_5.invoke()
    if c43_5=='1' and b43_5var.get()==0:
        b43_5.invoke()
    if c43_6=='0' and b43_6var.get()==1:
        b43_6.invoke()
    if c43_6=='1' and b43_6var.get()==0:
        b43_6.invoke()
    if c43_7=='0' and b43_7var.get()==1:
        b43_7.invoke()
    if c43_7=='1' and b43_7var.get()==0:
        b43_7.invoke()
    if c43_8=='0' and b43_8var.get()==1:
        b43_8.invoke()
    if c43_8=='1' and b43_8var.get()==0:
        b43_8.invoke()
    if c43_9=='0' and b43_9var.get()==1:
        b43_9invoke()
    if c43_9=='1' and b43_9var.get()==0:
        b43_9.invoke()
    if c43_10=='0' and b43_10var.get()==1:
        b43_10.invoke()
    if c43_10=='1' and b43_10var.get()==0:
        b43_10.invoke()
    if c43_11=='0' and b43_11var.get()==1:
        b43_11.invoke()
    if c43_11=='1' and b43_11var.get()==0:
        b43_11.invoke()
    if c43_12=='0' and b43_12var.get()==1:
        b43_12.invoke()
    if c43_12=='1' and b43_12var.get()==0:
        b43_12.invoke()
    if c43_13=='0' and b43_13var.get()==1:
        b43_13.invoke()
    if c43_13=='1' and b43_13var.get()==0:
        b43_13.invoke()
    if c43_14=='0' and b43_14var.get()==1:
        b43_14.invoke()
    if c43_14=='1' and b43_14var.get()==0:
        b43_14.invoke()
    if c43_15=='0' and b43_15var.get()==1:
        b43_15.invoke()
    if c43_15=='1' and b43_15var.get()==0:
        b43_15.invoke()
    if c43_17=='0' and b43_17var.get()==1:
        b43_17.invoke()
    if c43_17=='1' and b43_17var.get()==0:
        b43_17.invoke()
    if tr_44=='1' and trig_44var.get()==0:
        trig_44.invoke()
       
    if c44_0=='0' and b44_0var.get()==1:
        b44_0.invoke()
    if c44_0=='1' and b44_0var.get()==0:
        b44_0.invoke()
    if c44_1=='0' and b44_1var.get()==1:
        b44_1.invoke()
    if c44_1=='1' and b44_1var.get()==0:
        b44_1.invoke()
    if c44_2=='0' and b44_2var.get()==1:
        b44_2.invoke()
    if c44_2=='1' and b44_2var.get()==0:
        b44_2.invoke()
    if c44_3=='0' and b44_3var.get()==1:
        b44_3.invoke()
    if c44_3=='1' and b44_3var.get()==0:
        b44_3.invoke()
    if c44_4=='0' and b44_4var.get()==1:
        b44_4.invoke()
    if c44_4=='1' and b44_4var.get()==0:
        b44_4.invoke()
    if c44_5=='0' and b44_5var.get()==1:
        b44_5.invoke()
    if c44_5=='1' and b44_5var.get()==0:
        b44_5.invoke()
    if c44_6=='0' and b44_6var.get()==1:
        b44_6.invoke()
    if c44_6=='1' and b44_6var.get()==0:
        b44_6.invoke()
    if c44_7=='0' and b44_7var.get()==1:
        b44_7.invoke()
    if c44_7=='1' and b44_7var.get()==0:
        b44_7.invoke()
    if c44_8=='0' and b44_8var.get()==1:
        b44_8.invoke()
    if c44_8=='1' and b44_8var.get()==0:
        b44_8.invoke()
    if c44_9=='0' and b44_9var.get()==1:
        b44_9invoke()
    if c44_9=='1' and b44_9var.get()==0:
        b44_9.invoke()
    if c44_10=='0' and b44_10var.get()==1:
        b44_10.invoke()
    if c44_10=='1' and b44_10var.get()==0:
        b44_10.invoke()
    if c44_11=='0' and b44_11var.get()==1:
        b44_11.invoke()
    if c44_11=='1' and b44_11var.get()==0:
        b44_11.invoke()
    if c44_12=='0' and b44_12var.get()==1:
        b44_12.invoke()
    if c44_12=='1' and b44_12var.get()==0:
        b44_12.invoke()
    if c44_13=='0' and b44_13var.get()==1:
        b44_13.invoke()
    if c44_13=='1' and b44_13var.get()==0:
        b44_13.invoke()
    if c44_14=='0' and b44_14var.get()==1:
        b44_14.invoke()
    if c44_14=='1' and b44_14var.get()==0:
        b44_14.invoke()
    if c44_15=='0' and b44_15var.get()==1:
        b44_15.invoke()
    if c44_15=='1' and b44_15var.get()==0:
        b44_15.invoke()
    if c44_17=='0' and b44_17var.get()==1:
        b44_17.invoke()
    if c44_17=='1' and b44_17var.get()==0:
        b44_17.invoke()
    if tr_45=='1' and trig_45var.get()==0:
        trig_45.invoke()
       
    if c45_0=='0' and b45_0var.get()==1:
        b45_0.invoke()
    if c45_0=='1' and b45_0var.get()==0:
        b45_0.invoke()
    if c45_1=='0' and b45_1var.get()==1:
        b45_1.invoke()
    if c45_1=='1' and b45_1var.get()==0:
        b45_1.invoke()
    if c45_2=='0' and b45_2var.get()==1:
        b45_2.invoke()
    if c45_2=='1' and b45_2var.get()==0:
        b45_2.invoke()
    if c45_3=='0' and b45_3var.get()==1:
        b45_3.invoke()
    if c45_3=='1' and b45_3var.get()==0:
        b45_3.invoke()
    if c45_4=='0' and b45_4var.get()==1:
        b45_4.invoke()
    if c45_4=='1' and b45_4var.get()==0:
        b45_4.invoke()
    if c45_5=='0' and b45_5var.get()==1:
        b45_5.invoke()
    if c45_5=='1' and b45_5var.get()==0:
        b45_5.invoke()
    if c45_6=='0' and b45_6var.get()==1:
        b45_6.invoke()
    if c45_6=='1' and b45_6var.get()==0:
        b45_6.invoke()
    if c45_7=='0' and b45_7var.get()==1:
        b45_7.invoke()
    if c45_7=='1' and b45_7var.get()==0:
        b45_7.invoke()
    if c45_8=='0' and b45_8var.get()==1:
        b45_8.invoke()
    if c45_8=='1' and b45_8var.get()==0:
        b45_8.invoke()
    if c45_9=='0' and b45_9var.get()==1:
        b45_9invoke()
    if c45_9=='1' and b45_9var.get()==0:
        b45_9.invoke()
    if c45_10=='0' and b45_10var.get()==1:
        b45_10.invoke()
    if c45_10=='1' and b45_10var.get()==0:
        b45_10.invoke()
    if c45_11=='0' and b45_11var.get()==1:
        b45_11.invoke()
    if c45_11=='1' and b45_11var.get()==0:
        b45_11.invoke()
    if c45_12=='0' and b45_12var.get()==1:
        b45_12.invoke()
    if c45_12=='1' and b45_12var.get()==0:
        b45_12.invoke()
    if c45_13=='0' and b45_13var.get()==1:
        b45_13.invoke()
    if c45_13=='1' and b45_13var.get()==0:
        b45_13.invoke()
    if c45_14=='0' and b45_14var.get()==1:
        b45_14.invoke()
    if c45_14=='1' and b45_14var.get()==0:
        b45_14.invoke()
    if c45_15=='0' and b45_15var.get()==1:
        b45_15.invoke()
    if c45_15=='1' and b45_15var.get()==0:
        b45_15.invoke()
    if c45_17=='0' and b45_17var.get()==1:
        b45_17.invoke()
    if c45_17=='1' and b45_17var.get()==0:
        b45_17.invoke()
    if tr_46=='1' and trig_46var.get()==0:
        trig_46.invoke()
       
    if c46_0=='0' and b46_0var.get()==1:
        b46_0.invoke()
    if c46_0=='1' and b46_0var.get()==0:
        b46_0.invoke()
    if c46_1=='0' and b46_1var.get()==1:
        b46_1.invoke()
    if c46_1=='1' and b46_1var.get()==0:
        b46_1.invoke()
    if c46_2=='0' and b46_2var.get()==1:
        b46_2.invoke()
    if c46_2=='1' and b46_2var.get()==0:
        b46_2.invoke()
    if c46_3=='0' and b46_3var.get()==1:
        b46_3.invoke()
    if c46_3=='1' and b46_3var.get()==0:
        b46_3.invoke()
    if c46_4=='0' and b46_4var.get()==1:
        b46_4.invoke()
    if c46_4=='1' and b46_4var.get()==0:
        b46_4.invoke()
    if c46_5=='0' and b46_5var.get()==1:
        b46_5.invoke()
    if c46_5=='1' and b46_5var.get()==0:
        b46_5.invoke()
    if c46_6=='0' and b46_6var.get()==1:
        b46_6.invoke()
    if c46_6=='1' and b46_6var.get()==0:
        b46_6.invoke()
    if c46_7=='0' and b46_7var.get()==1:
        b46_7.invoke()
    if c46_7=='1' and b46_7var.get()==0:
        b46_7.invoke()
    if c46_8=='0' and b46_8var.get()==1:
        b46_8.invoke()
    if c46_8=='1' and b46_8var.get()==0:
        b46_8.invoke()
    if c46_9=='0' and b46_9var.get()==1:
        b46_9invoke()
    if c46_9=='1' and b46_9var.get()==0:
        b46_9.invoke()
    if c46_10=='0' and b46_10var.get()==1:
        b46_10.invoke()
    if c46_10=='1' and b46_10var.get()==0:
        b46_10.invoke()
    if c46_11=='0' and b46_11var.get()==1:
        b46_11.invoke()
    if c46_11=='1' and b46_11var.get()==0:
        b46_11.invoke()
    if c46_12=='0' and b46_12var.get()==1:
        b46_12.invoke()
    if c46_12=='1' and b46_12var.get()==0:
        b46_12.invoke()
    if c46_13=='0' and b46_13var.get()==1:
        b46_13.invoke()
    if c46_13=='1' and b46_13var.get()==0:
        b46_13.invoke()
    if c46_14=='0' and b46_14var.get()==1:
        b46_14.invoke()
    if c46_14=='1' and b46_14var.get()==0:
        b46_14.invoke()
    if c46_15=='0' and b46_15var.get()==1:
        b46_15.invoke()
    if c46_15=='1' and b46_15var.get()==0:
        b46_15.invoke()
    if c46_17=='0' and b46_17var.get()==1:
        b46_17.invoke()
    if c46_17=='1' and b46_17var.get()==0:
        b46_17.invoke()
    if tr_47=='1' and trig_47var.get()==0:
        trig_47.invoke()
       
    if c47_0=='0' and b47_0var.get()==1:
        b47_0.invoke()
    if c47_0=='1' and b47_0var.get()==0:
        b47_0.invoke()
    if c47_1=='0' and b47_1var.get()==1:
        b47_1.invoke()
    if c47_1=='1' and b47_1var.get()==0:
        b47_1.invoke()
    if c47_2=='0' and b47_2var.get()==1:
        b47_2.invoke()
    if c47_2=='1' and b47_2var.get()==0:
        b47_2.invoke()
    if c47_3=='0' and b47_3var.get()==1:
        b47_3.invoke()
    if c47_3=='1' and b47_3var.get()==0:
        b47_3.invoke()
    if c47_4=='0' and b47_4var.get()==1:
        b47_4.invoke()
    if c47_4=='1' and b47_4var.get()==0:
        b47_4.invoke()
    if c47_5=='0' and b47_5var.get()==1:
        b47_5.invoke()
    if c47_5=='1' and b47_5var.get()==0:
        b47_5.invoke()
    if c47_6=='0' and b47_6var.get()==1:
        b47_6.invoke()
    if c47_6=='1' and b47_6var.get()==0:
        b47_6.invoke()
    if c47_7=='0' and b47_7var.get()==1:
        b47_7.invoke()
    if c47_7=='1' and b47_7var.get()==0:
        b47_7.invoke()
    if c47_8=='0' and b47_8var.get()==1:
        b47_8.invoke()
    if c47_8=='1' and b47_8var.get()==0:
        b47_8.invoke()
    if c47_9=='0' and b47_9var.get()==1:
        b47_9invoke()
    if c47_9=='1' and b47_9var.get()==0:
        b47_9.invoke()
    if c47_10=='0' and b47_10var.get()==1:
        b47_10.invoke()
    if c47_10=='1' and b47_10var.get()==0:
        b47_10.invoke()
    if c47_11=='0' and b47_11var.get()==1:
        b47_11.invoke()
    if c47_11=='1' and b47_11var.get()==0:
        b47_11.invoke()
    if c47_12=='0' and b47_12var.get()==1:
        b47_12.invoke()
    if c47_12=='1' and b47_12var.get()==0:
        b47_12.invoke()
    if c47_13=='0' and b47_13var.get()==1:
        b47_13.invoke()
    if c47_13=='1' and b47_13var.get()==0:
        b47_13.invoke()
    if c47_14=='0' and b47_14var.get()==1:
        b47_14.invoke()
    if c47_14=='1' and b47_14var.get()==0:
        b47_14.invoke()
    if c47_15=='0' and b47_15var.get()==1:
        b47_15.invoke()
    if c47_15=='1' and b47_15var.get()==0:
        b47_15.invoke()
    if c47_17=='0' and b47_17var.get()==1:
        b47_17.invoke()
    if c47_17=='1' and b47_17var.get()==0:
        b47_17.invoke()
    if tr_48=='1' and trig_48var.get()==0:
        trig_48.invoke()
       
    if c48_0=='0' and b48_0var.get()==1:
        b48_0.invoke()
    if c48_0=='1' and b48_0var.get()==0:
        b48_0.invoke()
    if c48_1=='0' and b48_1var.get()==1:
        b48_1.invoke()
    if c48_1=='1' and b48_1var.get()==0:
        b48_1.invoke()
    if c48_2=='0' and b48_2var.get()==1:
        b48_2.invoke()
    if c48_2=='1' and b48_2var.get()==0:
        b48_2.invoke()
    if c48_3=='0' and b48_3var.get()==1:
        b48_3.invoke()
    if c48_3=='1' and b48_3var.get()==0:
        b48_3.invoke()
    if c48_4=='0' and b48_4var.get()==1:
        b48_4.invoke()
    if c48_4=='1' and b48_4var.get()==0:
        b48_4.invoke()
    if c48_5=='0' and b48_5var.get()==1:
        b48_5.invoke()
    if c48_5=='1' and b48_5var.get()==0:
        b48_5.invoke()
    if c48_6=='0' and b48_6var.get()==1:
        b48_6.invoke()
    if c48_6=='1' and b48_6var.get()==0:
        b48_6.invoke()
    if c48_7=='0' and b48_7var.get()==1:
        b48_7.invoke()
    if c48_7=='1' and b48_7var.get()==0:
        b48_7.invoke()
    if c48_8=='0' and b48_8var.get()==1:
        b48_8.invoke()
    if c48_8=='1' and b48_8var.get()==0:
        b48_8.invoke()
    if c48_9=='0' and b48_9var.get()==1:
        b48_9invoke()
    if c48_9=='1' and b48_9var.get()==0:
        b48_9.invoke()
    if c48_10=='0' and b48_10var.get()==1:
        b48_10.invoke()
    if c48_10=='1' and b48_10var.get()==0:
        b48_10.invoke()
    if c48_11=='0' and b48_11var.get()==1:
        b48_11.invoke()
    if c48_11=='1' and b48_11var.get()==0:
        b48_11.invoke()
    if c48_12=='0' and b48_12var.get()==1:
        b48_12.invoke()
    if c48_12=='1' and b48_12var.get()==0:
        b48_12.invoke()
    if c48_13=='0' and b48_13var.get()==1:
        b48_13.invoke()
    if c48_13=='1' and b48_13var.get()==0:
        b48_13.invoke()
    if c48_14=='0' and b48_14var.get()==1:
        b48_14.invoke()
    if c48_14=='1' and b48_14var.get()==0:
        b48_14.invoke()
    if c48_15=='0' and b48_15var.get()==1:
        b48_15.invoke()
    if c48_15=='1' and b48_15var.get()==0:
        b48_15.invoke()
    if c48_17=='0' and b48_17var.get()==1:
        b48_17.invoke()
    if c48_17=='1' and b48_17var.get()==0:
        b48_17.invoke()
    if tr_49=='1' and trig_49var.get()==0:
        trig_49.invoke()
       
    if c49_0=='0' and b49_0var.get()==1:
        b49_0.invoke()
    if c49_0=='1' and b49_0var.get()==0:
        b49_0.invoke()
    if c49_1=='0' and b49_1var.get()==1:
        b49_1.invoke()
    if c49_1=='1' and b49_1var.get()==0:
        b49_1.invoke()
    if c49_2=='0' and b49_2var.get()==1:
        b49_2.invoke()
    if c49_2=='1' and b49_2var.get()==0:
        b49_2.invoke()
    if c49_3=='0' and b49_3var.get()==1:
        b49_3.invoke()
    if c49_3=='1' and b49_3var.get()==0:
        b49_3.invoke()
    if c49_4=='0' and b49_4var.get()==1:
        b49_4.invoke()
    if c49_4=='1' and b49_4var.get()==0:
        b49_4.invoke()
    if c49_5=='0' and b49_5var.get()==1:
        b49_5.invoke()
    if c49_5=='1' and b49_5var.get()==0:
        b49_5.invoke()
    if c49_6=='0' and b49_6var.get()==1:
        b49_6.invoke()
    if c49_6=='1' and b49_6var.get()==0:
        b49_6.invoke()
    if c49_7=='0' and b49_7var.get()==1:
        b49_7.invoke()
    if c49_7=='1' and b49_7var.get()==0:
        b49_7.invoke()
    if c49_8=='0' and b49_8var.get()==1:
        b49_8.invoke()
    if c49_8=='1' and b49_8var.get()==0:
        b49_8.invoke()
    if c49_9=='0' and b49_9var.get()==1:
        b49_9invoke()
    if c49_9=='1' and b49_9var.get()==0:
        b49_9.invoke()
    if c49_10=='0' and b49_10var.get()==1:
        b49_10.invoke()
    if c49_10=='1' and b49_10var.get()==0:
        b49_10.invoke()
    if c49_11=='0' and b49_11var.get()==1:
        b49_11.invoke()
    if c49_11=='1' and b49_11var.get()==0:
        b49_11.invoke()
    if c49_12=='0' and b49_12var.get()==1:
        b49_12.invoke()
    if c49_12=='1' and b49_12var.get()==0:
        b49_12.invoke()
    if c49_13=='0' and b49_13var.get()==1:
        b49_13.invoke()
    if c49_13=='1' and b49_13var.get()==0:
        b49_13.invoke()
    if c49_14=='0' and b49_14var.get()==1:
        b49_14.invoke()
    if c49_14=='1' and b49_14var.get()==0:
        b49_14.invoke()
    if c49_15=='0' and b49_15var.get()==1:
        b49_15.invoke()
    if c49_15=='1' and b49_15var.get()==0:
        b49_15.invoke()
    if c49_17=='0' and b49_17var.get()==1:
        b49_17.invoke()
    if c49_17=='1' and b49_17var.get()==0:
        b49_17.invoke()
    if tr_50=='1' and trig_50var.get()==0:
        trig_50.invoke()
       
    if c50_0=='0' and b50_0var.get()==1:
        b50_0.invoke()
    if c50_0=='1' and b50_0var.get()==0:
        b50_0.invoke()
    if c50_1=='0' and b50_1var.get()==1:
        b50_1.invoke()
    if c50_1=='1' and b50_1var.get()==0:
        b50_1.invoke()
    if c50_2=='0' and b50_2var.get()==1:
        b50_2.invoke()
    if c50_2=='1' and b50_2var.get()==0:
        b50_2.invoke()
    if c50_3=='0' and b50_3var.get()==1:
        b50_3.invoke()
    if c50_3=='1' and b50_3var.get()==0:
        b50_3.invoke()
    if c50_4=='0' and b50_4var.get()==1:
        b50_4.invoke()
    if c50_4=='1' and b50_4var.get()==0:
        b50_4.invoke()
    if c50_5=='0' and b50_5var.get()==1:
        b50_5.invoke()
    if c50_5=='1' and b50_5var.get()==0:
        b50_5.invoke()
    if c50_6=='0' and b50_6var.get()==1:
        b50_6.invoke()
    if c50_6=='1' and b50_6var.get()==0:
        b50_6.invoke()
    if c50_7=='0' and b50_7var.get()==1:
        b50_7.invoke()
    if c50_7=='1' and b50_7var.get()==0:
        b50_7.invoke()
    if c50_8=='0' and b50_8var.get()==1:
        b50_8.invoke()
    if c50_8=='1' and b50_8var.get()==0:
        b50_8.invoke()
    if c50_9=='0' and b50_9var.get()==1:
        b50_9invoke()
    if c50_9=='1' and b50_9var.get()==0:
        b50_9.invoke()
    if c50_10=='0' and b50_10var.get()==1:
        b50_10.invoke()
    if c50_10=='1' and b50_10var.get()==0:
        b50_10.invoke()
    if c50_11=='0' and b50_11var.get()==1:
        b50_11.invoke()
    if c50_11=='1' and b50_11var.get()==0:
        b50_11.invoke()
    if c50_12=='0' and b50_12var.get()==1:
        b50_12.invoke()
    if c50_12=='1' and b50_12var.get()==0:
        b50_12.invoke()
    if c50_13=='0' and b50_13var.get()==1:
        b50_13.invoke()
    if c50_13=='1' and b50_13var.get()==0:
        b50_13.invoke()
    if c50_14=='0' and b50_14var.get()==1:
        b50_14.invoke()
    if c50_14=='1' and b50_14var.get()==0:
        b50_14.invoke()
    if c50_15=='0' and b50_15var.get()==1:
        b50_15.invoke()
    if c50_15=='1' and b50_15var.get()==0:
        b50_15.invoke()
    if c50_17=='0' and b50_17var.get()==1:
        b50_17.invoke()
    if c50_17=='1' and b50_17var.get()==0:
        b50_17.invoke()
    if tr_51=='1' and trig_51var.get()==0:
        trig_51.invoke()
       
    if c51_0=='0' and b51_0var.get()==1:
        b51_0.invoke()
    if c51_0=='1' and b51_0var.get()==0:
        b51_0.invoke()
    if c51_1=='0' and b51_1var.get()==1:
        b51_1.invoke()
    if c51_1=='1' and b51_1var.get()==0:
        b51_1.invoke()
    if c51_2=='0' and b51_2var.get()==1:
        b51_2.invoke()
    if c51_2=='1' and b51_2var.get()==0:
        b51_2.invoke()
    if c51_3=='0' and b51_3var.get()==1:
        b51_3.invoke()
    if c51_3=='1' and b51_3var.get()==0:
        b51_3.invoke()
    if c51_4=='0' and b51_4var.get()==1:
        b51_4.invoke()
    if c51_4=='1' and b51_4var.get()==0:
        b51_4.invoke()
    if c51_5=='0' and b51_5var.get()==1:
        b51_5.invoke()
    if c51_5=='1' and b51_5var.get()==0:
        b51_5.invoke()
    if c51_6=='0' and b51_6var.get()==1:
        b51_6.invoke()
    if c51_6=='1' and b51_6var.get()==0:
        b51_6.invoke()
    if c51_7=='0' and b51_7var.get()==1:
        b51_7.invoke()
    if c51_7=='1' and b51_7var.get()==0:
        b51_7.invoke()
    if c51_8=='0' and b51_8var.get()==1:
        b51_8.invoke()
    if c51_8=='1' and b51_8var.get()==0:
        b51_8.invoke()
    if c51_9=='0' and b51_9var.get()==1:
        b51_9invoke()
    if c51_9=='1' and b51_9var.get()==0:
        b51_9.invoke()
    if c51_10=='0' and b51_10var.get()==1:
        b51_10.invoke()
    if c51_10=='1' and b51_10var.get()==0:
        b51_10.invoke()
    if c51_11=='0' and b51_11var.get()==1:
        b51_11.invoke()
    if c51_11=='1' and b51_11var.get()==0:
        b51_11.invoke()
    if c51_12=='0' and b51_12var.get()==1:
        b51_12.invoke()
    if c51_12=='1' and b51_12var.get()==0:
        b51_12.invoke()
    if c51_13=='0' and b51_13var.get()==1:
        b51_13.invoke()
    if c51_13=='1' and b51_13var.get()==0:
        b51_13.invoke()
    if c51_14=='0' and b51_14var.get()==1:
        b51_14.invoke()
    if c51_14=='1' and b51_14var.get()==0:
        b51_14.invoke()
    if c51_15=='0' and b51_15var.get()==1:
        b51_15.invoke()
    if c51_15=='1' and b51_15var.get()==0:
        b51_15.invoke()
    if c51_17=='0' and b51_17var.get()==1:
        b51_17.invoke()
    if c51_17=='1' and b51_17var.get()==0:
        b51_17.invoke()
    if tr_52=='1' and trig_52var.get()==0:
        trig_52.invoke()
       
    if c52_0=='0' and b52_0var.get()==1:
        b52_0.invoke()
    if c52_0=='1' and b52_0var.get()==0:
        b52_0.invoke()
    if c52_1=='0' and b52_1var.get()==1:
        b52_1.invoke()
    if c52_1=='1' and b52_1var.get()==0:
        b52_1.invoke()
    if c52_2=='0' and b52_2var.get()==1:
        b52_2.invoke()
    if c52_2=='1' and b52_2var.get()==0:
        b52_2.invoke()
    if c52_3=='0' and b52_3var.get()==1:
        b52_3.invoke()
    if c52_3=='1' and b52_3var.get()==0:
        b52_3.invoke()
    if c52_4=='0' and b52_4var.get()==1:
        b52_4.invoke()
    if c52_4=='1' and b52_4var.get()==0:
        b52_4.invoke()
    if c52_5=='0' and b52_5var.get()==1:
        b52_5.invoke()
    if c52_5=='1' and b52_5var.get()==0:
        b52_5.invoke()
    if c52_6=='0' and b52_6var.get()==1:
        b52_6.invoke()
    if c52_6=='1' and b52_6var.get()==0:
        b52_6.invoke()
    if c52_7=='0' and b52_7var.get()==1:
        b52_7.invoke()
    if c52_7=='1' and b52_7var.get()==0:
        b52_7.invoke()
    if c52_8=='0' and b52_8var.get()==1:
        b52_8.invoke()
    if c52_8=='1' and b52_8var.get()==0:
        b52_8.invoke()
    if c52_9=='0' and b52_9var.get()==1:
        b52_9invoke()
    if c52_9=='1' and b52_9var.get()==0:
        b52_9.invoke()
    if c52_10=='0' and b52_10var.get()==1:
        b52_10.invoke()
    if c52_10=='1' and b52_10var.get()==0:
        b52_10.invoke()
    if c52_11=='0' and b52_11var.get()==1:
        b52_11.invoke()
    if c52_11=='1' and b52_11var.get()==0:
        b52_11.invoke()
    if c52_12=='0' and b52_12var.get()==1:
        b52_12.invoke()
    if c52_12=='1' and b52_12var.get()==0:
        b52_12.invoke()
    if c52_13=='0' and b52_13var.get()==1:
        b52_13.invoke()
    if c52_13=='1' and b52_13var.get()==0:
        b52_13.invoke()
    if c52_14=='0' and b52_14var.get()==1:
        b52_14.invoke()
    if c52_14=='1' and b52_14var.get()==0:
        b52_14.invoke()
    if c52_15=='0' and b52_15var.get()==1:
        b52_15.invoke()
    if c52_15=='1' and b52_15var.get()==0:
        b52_15.invoke()
    if c52_17=='0' and b52_17var.get()==1:
        b52_17.invoke()
    if c52_17=='1' and b52_17var.get()==0:
        b52_17.invoke()
    if tr_53=='1' and trig_53var.get()==0:
        trig_53.invoke()
       
    if c53_0=='0' and b53_0var.get()==1:
        b53_0.invoke()
    if c53_0=='1' and b53_0var.get()==0:
        b53_0.invoke()
    if c53_1=='0' and b53_1var.get()==1:
        b53_1.invoke()
    if c53_1=='1' and b53_1var.get()==0:
        b53_1.invoke()
    if c53_2=='0' and b53_2var.get()==1:
        b53_2.invoke()
    if c53_2=='1' and b53_2var.get()==0:
        b53_2.invoke()
    if c53_3=='0' and b53_3var.get()==1:
        b53_3.invoke()
    if c53_3=='1' and b53_3var.get()==0:
        b53_3.invoke()
    if c53_4=='0' and b53_4var.get()==1:
        b53_4.invoke()
    if c53_4=='1' and b53_4var.get()==0:
        b53_4.invoke()
    if c53_5=='0' and b53_5var.get()==1:
        b53_5.invoke()
    if c53_5=='1' and b53_5var.get()==0:
        b53_5.invoke()
    if c53_6=='0' and b53_6var.get()==1:
        b53_6.invoke()
    if c53_6=='1' and b53_6var.get()==0:
        b53_6.invoke()
    if c53_7=='0' and b53_7var.get()==1:
        b53_7.invoke()
    if c53_7=='1' and b53_7var.get()==0:
        b53_7.invoke()
    if c53_8=='0' and b53_8var.get()==1:
        b53_8.invoke()
    if c53_8=='1' and b53_8var.get()==0:
        b53_8.invoke()
    if c53_9=='0' and b53_9var.get()==1:
        b53_9invoke()
    if c53_9=='1' and b53_9var.get()==0:
        b53_9.invoke()
    if c53_10=='0' and b53_10var.get()==1:
        b53_10.invoke()
    if c53_10=='1' and b53_10var.get()==0:
        b53_10.invoke()
    if c53_11=='0' and b53_11var.get()==1:
        b53_11.invoke()
    if c53_11=='1' and b53_11var.get()==0:
        b53_11.invoke()
    if c53_12=='0' and b53_12var.get()==1:
        b53_12.invoke()
    if c53_12=='1' and b53_12var.get()==0:
        b53_12.invoke()
    if c53_13=='0' and b53_13var.get()==1:
        b53_13.invoke()
    if c53_13=='1' and b53_13var.get()==0:
        b53_13.invoke()
    if c53_14=='0' and b53_14var.get()==1:
        b53_14.invoke()
    if c53_14=='1' and b53_14var.get()==0:
        b53_14.invoke()
    if c53_15=='0' and b53_15var.get()==1:
        b53_15.invoke()
    if c53_15=='1' and b53_15var.get()==0:
        b53_15.invoke()
    if c53_17=='0' and b53_17var.get()==1:
        b53_17.invoke()
    if c53_17=='1' and b53_17var.get()==0:
        b53_17.invoke()
    if tr_54=='1' and trig_54var.get()==0:
        trig_54.invoke()
       
    if c54_0=='0' and b54_0var.get()==1:
        b54_0.invoke()
    if c54_0=='1' and b54_0var.get()==0:
        b54_0.invoke()
    if c54_1=='0' and b54_1var.get()==1:
        b54_1.invoke()
    if c54_1=='1' and b54_1var.get()==0:
        b54_1.invoke()
    if c54_2=='0' and b54_2var.get()==1:
        b54_2.invoke()
    if c54_2=='1' and b54_2var.get()==0:
        b54_2.invoke()
    if c54_3=='0' and b54_3var.get()==1:
        b54_3.invoke()
    if c54_3=='1' and b54_3var.get()==0:
        b54_3.invoke()
    if c54_4=='0' and b54_4var.get()==1:
        b54_4.invoke()
    if c54_4=='1' and b54_4var.get()==0:
        b54_4.invoke()
    if c54_5=='0' and b54_5var.get()==1:
        b54_5.invoke()
    if c54_5=='1' and b54_5var.get()==0:
        b54_5.invoke()
    if c54_6=='0' and b54_6var.get()==1:
        b54_6.invoke()
    if c54_6=='1' and b54_6var.get()==0:
        b54_6.invoke()
    if c54_7=='0' and b54_7var.get()==1:
        b54_7.invoke()
    if c54_7=='1' and b54_7var.get()==0:
        b54_7.invoke()
    if c54_8=='0' and b54_8var.get()==1:
        b54_8.invoke()
    if c54_8=='1' and b54_8var.get()==0:
        b54_8.invoke()
    if c54_9=='0' and b54_9var.get()==1:
        b54_9invoke()
    if c54_9=='1' and b54_9var.get()==0:
        b54_9.invoke()
    if c54_10=='0' and b54_10var.get()==1:
        b54_10.invoke()
    if c54_10=='1' and b54_10var.get()==0:
        b54_10.invoke()
    if c54_11=='0' and b54_11var.get()==1:
        b54_11.invoke()
    if c54_11=='1' and b54_11var.get()==0:
        b54_11.invoke()
    if c54_12=='0' and b54_12var.get()==1:
        b54_12.invoke()
    if c54_12=='1' and b54_12var.get()==0:
        b54_12.invoke()
    if c54_13=='0' and b54_13var.get()==1:
        b54_13.invoke()
    if c54_13=='1' and b54_13var.get()==0:
        b54_13.invoke()
    if c54_14=='0' and b54_14var.get()==1:
        b54_14.invoke()
    if c54_14=='1' and b54_14var.get()==0:
        b54_14.invoke()
    if c54_15=='0' and b54_15var.get()==1:
        b54_15.invoke()
    if c54_15=='1' and b54_15var.get()==0:
        b54_15.invoke()
    if c54_17=='0' and b54_17var.get()==1:
        b54_17.invoke()
    if c54_17=='1' and b54_17var.get()==0:
        b54_17.invoke()
    if tr_55=='1' and trig_55var.get()==0:
        trig_55.invoke()
       
    if c55_0=='0' and b55_0var.get()==1:
        b55_0.invoke()
    if c55_0=='1' and b55_0var.get()==0:
        b55_0.invoke()
    if c55_1=='0' and b55_1var.get()==1:
        b55_1.invoke()
    if c55_1=='1' and b55_1var.get()==0:
        b55_1.invoke()
    if c55_2=='0' and b55_2var.get()==1:
        b55_2.invoke()
    if c55_2=='1' and b55_2var.get()==0:
        b55_2.invoke()
    if c55_3=='0' and b55_3var.get()==1:
        b55_3.invoke()
    if c55_3=='1' and b55_3var.get()==0:
        b55_3.invoke()
    if c55_4=='0' and b55_4var.get()==1:
        b55_4.invoke()
    if c55_4=='1' and b55_4var.get()==0:
        b55_4.invoke()
    if c55_5=='0' and b55_5var.get()==1:
        b55_5.invoke()
    if c55_5=='1' and b55_5var.get()==0:
        b55_5.invoke()
    if c55_6=='0' and b55_6var.get()==1:
        b55_6.invoke()
    if c55_6=='1' and b55_6var.get()==0:
        b55_6.invoke()
    if c55_7=='0' and b55_7var.get()==1:
        b55_7.invoke()
    if c55_7=='1' and b55_7var.get()==0:
        b55_7.invoke()
    if c55_8=='0' and b55_8var.get()==1:
        b55_8.invoke()
    if c55_8=='1' and b55_8var.get()==0:
        b55_8.invoke()
    if c55_9=='0' and b55_9var.get()==1:
        b55_9invoke()
    if c55_9=='1' and b55_9var.get()==0:
        b55_9.invoke()
    if c55_10=='0' and b55_10var.get()==1:
        b55_10.invoke()
    if c55_10=='1' and b55_10var.get()==0:
        b55_10.invoke()
    if c55_11=='0' and b55_11var.get()==1:
        b55_11.invoke()
    if c55_11=='1' and b55_11var.get()==0:
        b55_11.invoke()
    if c55_12=='0' and b55_12var.get()==1:
        b55_12.invoke()
    if c55_12=='1' and b55_12var.get()==0:
        b55_12.invoke()
    if c55_13=='0' and b55_13var.get()==1:
        b55_13.invoke()
    if c55_13=='1' and b55_13var.get()==0:
        b55_13.invoke()
    if c55_14=='0' and b55_14var.get()==1:
        b55_14.invoke()
    if c55_14=='1' and b55_14var.get()==0:
        b55_14.invoke()
    if c55_15=='0' and b55_15var.get()==1:
        b55_15.invoke()
    if c55_15=='1' and b55_15var.get()==0:
        b55_15.invoke()
    if c55_17=='0' and b55_17var.get()==1:
        b55_17.invoke()
    if c55_17=='1' and b55_17var.get()==0:
        b55_17.invoke()
    if tr_56=='1' and trig_56var.get()==0:
        trig_56.invoke()
       
    if c56_0=='0' and b56_0var.get()==1:
        b56_0.invoke()
    if c56_0=='1' and b56_0var.get()==0:
        b56_0.invoke()
    if c56_1=='0' and b56_1var.get()==1:
        b56_1.invoke()
    if c56_1=='1' and b56_1var.get()==0:
        b56_1.invoke()
    if c56_2=='0' and b56_2var.get()==1:
        b56_2.invoke()
    if c56_2=='1' and b56_2var.get()==0:
        b56_2.invoke()
    if c56_3=='0' and b56_3var.get()==1:
        b56_3.invoke()
    if c56_3=='1' and b56_3var.get()==0:
        b56_3.invoke()
    if c56_4=='0' and b56_4var.get()==1:
        b56_4.invoke()
    if c56_4=='1' and b56_4var.get()==0:
        b56_4.invoke()
    if c56_5=='0' and b56_5var.get()==1:
        b56_5.invoke()
    if c56_5=='1' and b56_5var.get()==0:
        b56_5.invoke()
    if c56_6=='0' and b56_6var.get()==1:
        b56_6.invoke()
    if c56_6=='1' and b56_6var.get()==0:
        b56_6.invoke()
    if c56_7=='0' and b56_7var.get()==1:
        b56_7.invoke()
    if c56_7=='1' and b56_7var.get()==0:
        b56_7.invoke()
    if c56_8=='0' and b56_8var.get()==1:
        b56_8.invoke()
    if c56_8=='1' and b56_8var.get()==0:
        b56_8.invoke()
    if c56_9=='0' and b56_9var.get()==1:
        b56_9invoke()
    if c56_9=='1' and b56_9var.get()==0:
        b56_9.invoke()
    if c56_10=='0' and b56_10var.get()==1:
        b56_10.invoke()
    if c56_10=='1' and b56_10var.get()==0:
        b56_10.invoke()
    if c56_11=='0' and b56_11var.get()==1:
        b56_11.invoke()
    if c56_11=='1' and b56_11var.get()==0:
        b56_11.invoke()
    if c56_12=='0' and b56_12var.get()==1:
        b56_12.invoke()
    if c56_12=='1' and b56_12var.get()==0:
        b56_12.invoke()
    if c56_13=='0' and b56_13var.get()==1:
        b56_13.invoke()
    if c56_13=='1' and b56_13var.get()==0:
        b56_13.invoke()
    if c56_14=='0' and b56_14var.get()==1:
        b56_14.invoke()
    if c56_14=='1' and b56_14var.get()==0:
        b56_14.invoke()
    if c56_15=='0' and b56_15var.get()==1:
        b56_15.invoke()
    if c56_15=='1' and b56_15var.get()==0:
        b56_15.invoke()
    if c56_17=='0' and b56_17var.get()==1:
        b56_17.invoke()
    if c56_17=='1' and b56_17var.get()==0:
        b56_17.invoke()
    if tr_57=='1' and trig_57var.get()==0:
        trig_57.invoke()
       
    if c57_0=='0' and b57_0var.get()==1:
        b57_0.invoke()
    if c57_0=='1' and b57_0var.get()==0:
        b57_0.invoke()
    if c57_1=='0' and b57_1var.get()==1:
        b57_1.invoke()
    if c57_1=='1' and b57_1var.get()==0:
        b57_1.invoke()
    if c57_2=='0' and b57_2var.get()==1:
        b57_2.invoke()
    if c57_2=='1' and b57_2var.get()==0:
        b57_2.invoke()
    if c57_3=='0' and b57_3var.get()==1:
        b57_3.invoke()
    if c57_3=='1' and b57_3var.get()==0:
        b57_3.invoke()
    if c57_4=='0' and b57_4var.get()==1:
        b57_4.invoke()
    if c57_4=='1' and b57_4var.get()==0:
        b57_4.invoke()
    if c57_5=='0' and b57_5var.get()==1:
        b57_5.invoke()
    if c57_5=='1' and b57_5var.get()==0:
        b57_5.invoke()
    if c57_6=='0' and b57_6var.get()==1:
        b57_6.invoke()
    if c57_6=='1' and b57_6var.get()==0:
        b57_6.invoke()
    if c57_7=='0' and b57_7var.get()==1:
        b57_7.invoke()
    if c57_7=='1' and b57_7var.get()==0:
        b57_7.invoke()
    if c57_8=='0' and b57_8var.get()==1:
        b57_8.invoke()
    if c57_8=='1' and b57_8var.get()==0:
        b57_8.invoke()
    if c57_9=='0' and b57_9var.get()==1:
        b57_9invoke()
    if c57_9=='1' and b57_9var.get()==0:
        b57_9.invoke()
    if c57_10=='0' and b57_10var.get()==1:
        b57_10.invoke()
    if c57_10=='1' and b57_10var.get()==0:
        b57_10.invoke()
    if c57_11=='0' and b57_11var.get()==1:
        b57_11.invoke()
    if c57_11=='1' and b57_11var.get()==0:
        b57_11.invoke()
    if c57_12=='0' and b57_12var.get()==1:
        b57_12.invoke()
    if c57_12=='1' and b57_12var.get()==0:
        b57_12.invoke()
    if c57_13=='0' and b57_13var.get()==1:
        b57_13.invoke()
    if c57_13=='1' and b57_13var.get()==0:
        b57_13.invoke()
    if c57_14=='0' and b57_14var.get()==1:
        b57_14.invoke()
    if c57_14=='1' and b57_14var.get()==0:
        b57_14.invoke()
    if c57_15=='0' and b57_15var.get()==1:
        b57_15.invoke()
    if c57_15=='1' and b57_15var.get()==0:
        b57_15.invoke()
    if c57_17=='0' and b57_17var.get()==1:
        b57_17.invoke()
    if c57_17=='1' and b57_17var.get()==0:
        b57_17.invoke()
    if tr_58=='1' and trig_58var.get()==0:
        trig_58.invoke()
       
    if c58_0=='0' and b58_0var.get()==1:
        b58_0.invoke()
    if c58_0=='1' and b58_0var.get()==0:
        b58_0.invoke()
    if c58_1=='0' and b58_1var.get()==1:
        b58_1.invoke()
    if c58_1=='1' and b58_1var.get()==0:
        b58_1.invoke()
    if c58_2=='0' and b58_2var.get()==1:
        b58_2.invoke()
    if c58_2=='1' and b58_2var.get()==0:
        b58_2.invoke()
    if c58_3=='0' and b58_3var.get()==1:
        b58_3.invoke()
    if c58_3=='1' and b58_3var.get()==0:
        b58_3.invoke()
    if c58_4=='0' and b58_4var.get()==1:
        b58_4.invoke()
    if c58_4=='1' and b58_4var.get()==0:
        b58_4.invoke()
    if c58_5=='0' and b58_5var.get()==1:
        b58_5.invoke()
    if c58_5=='1' and b58_5var.get()==0:
        b58_5.invoke()
    if c58_6=='0' and b58_6var.get()==1:
        b58_6.invoke()
    if c58_6=='1' and b58_6var.get()==0:
        b58_6.invoke()
    if c58_7=='0' and b58_7var.get()==1:
        b58_7.invoke()
    if c58_7=='1' and b58_7var.get()==0:
        b58_7.invoke()
    if c58_8=='0' and b58_8var.get()==1:
        b58_8.invoke()
    if c58_8=='1' and b58_8var.get()==0:
        b58_8.invoke()
    if c58_9=='0' and b58_9var.get()==1:
        b58_9invoke()
    if c58_9=='1' and b58_9var.get()==0:
        b58_9.invoke()
    if c58_10=='0' and b58_10var.get()==1:
        b58_10.invoke()
    if c58_10=='1' and b58_10var.get()==0:
        b58_10.invoke()
    if c58_11=='0' and b58_11var.get()==1:
        b58_11.invoke()
    if c58_11=='1' and b58_11var.get()==0:
        b58_11.invoke()
    if c58_12=='0' and b58_12var.get()==1:
        b58_12.invoke()
    if c58_12=='1' and b58_12var.get()==0:
        b58_12.invoke()
    if c58_13=='0' and b58_13var.get()==1:
        b58_13.invoke()
    if c58_13=='1' and b58_13var.get()==0:
        b58_13.invoke()
    if c58_14=='0' and b58_14var.get()==1:
        b58_14.invoke()
    if c58_14=='1' and b58_14var.get()==0:
        b58_14.invoke()
    if c58_15=='0' and b58_15var.get()==1:
        b58_15.invoke()
    if c58_15=='1' and b58_15var.get()==0:
        b58_15.invoke()
    if c58_17=='0' and b58_17var.get()==1:
        b58_17.invoke()
    if c58_17=='1' and b58_17var.get()==0:
        b58_17.invoke()
    if tr_59=='1' and trig_59var.get()==0:
        trig_59.invoke()
       
    if c59_0=='0' and b59_0var.get()==1:
        b59_0.invoke()
    if c59_0=='1' and b59_0var.get()==0:
        b59_0.invoke()
    if c59_1=='0' and b59_1var.get()==1:
        b59_1.invoke()
    if c59_1=='1' and b59_1var.get()==0:
        b59_1.invoke()
    if c59_2=='0' and b59_2var.get()==1:
        b59_2.invoke()
    if c59_2=='1' and b59_2var.get()==0:
        b59_2.invoke()
    if c59_3=='0' and b59_3var.get()==1:
        b59_3.invoke()
    if c59_3=='1' and b59_3var.get()==0:
        b59_3.invoke()
    if c59_4=='0' and b59_4var.get()==1:
        b59_4.invoke()
    if c59_4=='1' and b59_4var.get()==0:
        b59_4.invoke()
    if c59_5=='0' and b59_5var.get()==1:
        b59_5.invoke()
    if c59_5=='1' and b59_5var.get()==0:
        b59_5.invoke()
    if c59_6=='0' and b59_6var.get()==1:
        b59_6.invoke()
    if c59_6=='1' and b59_6var.get()==0:
        b59_6.invoke()
    if c59_7=='0' and b59_7var.get()==1:
        b59_7.invoke()
    if c59_7=='1' and b59_7var.get()==0:
        b59_7.invoke()
    if c59_8=='0' and b59_8var.get()==1:
        b59_8.invoke()
    if c59_8=='1' and b59_8var.get()==0:
        b59_8.invoke()
    if c59_9=='0' and b59_9var.get()==1:
        b59_9invoke()
    if c59_9=='1' and b59_9var.get()==0:
        b59_9.invoke()
    if c59_10=='0' and b59_10var.get()==1:
        b59_10.invoke()
    if c59_10=='1' and b59_10var.get()==0:
        b59_10.invoke()
    if c59_11=='0' and b59_11var.get()==1:
        b59_11.invoke()
    if c59_11=='1' and b59_11var.get()==0:
        b59_11.invoke()
    if c59_12=='0' and b59_12var.get()==1:
        b59_12.invoke()
    if c59_12=='1' and b59_12var.get()==0:
        b59_12.invoke()
    if c59_13=='0' and b59_13var.get()==1:
        b59_13.invoke()
    if c59_13=='1' and b59_13var.get()==0:
        b59_13.invoke()
    if c59_14=='0' and b59_14var.get()==1:
        b59_14.invoke()
    if c59_14=='1' and b59_14var.get()==0:
        b59_14.invoke()
    if c59_15=='0' and b59_15var.get()==1:
        b59_15.invoke()
    if c59_15=='1' and b59_15var.get()==0:
        b59_15.invoke()
    if c59_17=='0' and b59_17var.get()==1:
        b59_17.invoke()
    if c59_17=='1' and b59_17var.get()==0:
        b59_17.invoke()
    if tr_60=='1' and trig_60var.get()==0:
        trig_60.invoke()
       
    if c60_0=='0' and b60_0var.get()==1:
        b60_0.invoke()
    if c60_0=='1' and b60_0var.get()==0:
        b60_0.invoke()
    if c60_1=='0' and b60_1var.get()==1:
        b60_1.invoke()
    if c60_1=='1' and b60_1var.get()==0:
        b60_1.invoke()
    if c60_2=='0' and b60_2var.get()==1:
        b60_2.invoke()
    if c60_2=='1' and b60_2var.get()==0:
        b60_2.invoke()
    if c60_3=='0' and b60_3var.get()==1:
        b60_3.invoke()
    if c60_3=='1' and b60_3var.get()==0:
        b60_3.invoke()
    if c60_4=='0' and b60_4var.get()==1:
        b60_4.invoke()
    if c60_4=='1' and b60_4var.get()==0:
        b60_4.invoke()
    if c60_5=='0' and b60_5var.get()==1:
        b60_5.invoke()
    if c60_5=='1' and b60_5var.get()==0:
        b60_5.invoke()
    if c60_6=='0' and b60_6var.get()==1:
        b60_6.invoke()
    if c60_6=='1' and b60_6var.get()==0:
        b60_6.invoke()
    if c60_7=='0' and b60_7var.get()==1:
        b60_7.invoke()
    if c60_7=='1' and b60_7var.get()==0:
        b60_7.invoke()
    if c60_8=='0' and b60_8var.get()==1:
        b60_8.invoke()
    if c60_8=='1' and b60_8var.get()==0:
        b60_8.invoke()
    if c60_9=='0' and b60_9var.get()==1:
        b60_9invoke()
    if c60_9=='1' and b60_9var.get()==0:
        b60_9.invoke()
    if c60_10=='0' and b60_10var.get()==1:
        b60_10.invoke()
    if c60_10=='1' and b60_10var.get()==0:
        b60_10.invoke()
    if c60_11=='0' and b60_11var.get()==1:
        b60_11.invoke()
    if c60_11=='1' and b60_11var.get()==0:
        b60_11.invoke()
    if c60_12=='0' and b60_12var.get()==1:
        b60_12.invoke()
    if c60_12=='1' and b60_12var.get()==0:
        b60_12.invoke()
    if c60_13=='0' and b60_13var.get()==1:
        b60_13.invoke()
    if c60_13=='1' and b60_13var.get()==0:
        b60_13.invoke()
    if c60_14=='0' and b60_14var.get()==1:
        b60_14.invoke()
    if c60_14=='1' and b60_14var.get()==0:
        b60_14.invoke()
    if c60_15=='0' and b60_15var.get()==1:
        b60_15.invoke()
    if c60_15=='1' and b60_15var.get()==0:
        b60_15.invoke()
    if c60_17=='0' and b60_17var.get()==1:
        b60_17.invoke()
    if c60_17=='1' and b60_17var.get()==0:
        b60_17.invoke()
    if tr_61=='1' and trig_61var.get()==0:
        trig_61.invoke()
       
    if c61_0=='0' and b61_0var.get()==1:
        b61_0.invoke()
    if c61_0=='1' and b61_0var.get()==0:
        b61_0.invoke()
    if c61_1=='0' and b61_1var.get()==1:
        b61_1.invoke()
    if c61_1=='1' and b61_1var.get()==0:
        b61_1.invoke()
    if c61_2=='0' and b61_2var.get()==1:
        b61_2.invoke()
    if c61_2=='1' and b61_2var.get()==0:
        b61_2.invoke()
    if c61_3=='0' and b61_3var.get()==1:
        b61_3.invoke()
    if c61_3=='1' and b61_3var.get()==0:
        b61_3.invoke()
    if c61_4=='0' and b61_4var.get()==1:
        b61_4.invoke()
    if c61_4=='1' and b61_4var.get()==0:
        b61_4.invoke()
    if c61_5=='0' and b61_5var.get()==1:
        b61_5.invoke()
    if c61_5=='1' and b61_5var.get()==0:
        b61_5.invoke()
    if c61_6=='0' and b61_6var.get()==1:
        b61_6.invoke()
    if c61_6=='1' and b61_6var.get()==0:
        b61_6.invoke()
    if c61_7=='0' and b61_7var.get()==1:
        b61_7.invoke()
    if c61_7=='1' and b61_7var.get()==0:
        b61_7.invoke()
    if c61_8=='0' and b61_8var.get()==1:
        b61_8.invoke()
    if c61_8=='1' and b61_8var.get()==0:
        b61_8.invoke()
    if c61_9=='0' and b61_9var.get()==1:
        b61_9invoke()
    if c61_9=='1' and b61_9var.get()==0:
        b61_9.invoke()
    if c61_10=='0' and b61_10var.get()==1:
        b61_10.invoke()
    if c61_10=='1' and b61_10var.get()==0:
        b61_10.invoke()
    if c61_11=='0' and b61_11var.get()==1:
        b61_11.invoke()
    if c61_11=='1' and b61_11var.get()==0:
        b61_11.invoke()
    if c61_12=='0' and b61_12var.get()==1:
        b61_12.invoke()
    if c61_12=='1' and b61_12var.get()==0:
        b61_12.invoke()
    if c61_13=='0' and b61_13var.get()==1:
        b61_13.invoke()
    if c61_13=='1' and b61_13var.get()==0:
        b61_13.invoke()
    if c61_14=='0' and b61_14var.get()==1:
        b61_14.invoke()
    if c61_14=='1' and b61_14var.get()==0:
        b61_14.invoke()
    if c61_15=='0' and b61_15var.get()==1:
        b61_15.invoke()
    if c61_15=='1' and b61_15var.get()==0:
        b61_15.invoke()
    if c61_17=='0' and b61_17var.get()==1:
        b61_17.invoke()
    if c61_17=='1' and b61_17var.get()==0:
        b61_17.invoke()
    if tr_62=='1' and trig_62var.get()==0:
        trig_62.invoke()
       
    if c62_0=='0' and b62_0var.get()==1:
        b62_0.invoke()
    if c62_0=='1' and b62_0var.get()==0:
        b62_0.invoke()
    if c62_1=='0' and b62_1var.get()==1:
        b62_1.invoke()
    if c62_1=='1' and b62_1var.get()==0:
        b62_1.invoke()
    if c62_2=='0' and b62_2var.get()==1:
        b62_2.invoke()
    if c62_2=='1' and b62_2var.get()==0:
        b62_2.invoke()
    if c62_3=='0' and b62_3var.get()==1:
        b62_3.invoke()
    if c62_3=='1' and b62_3var.get()==0:
        b62_3.invoke()
    if c62_4=='0' and b62_4var.get()==1:
        b62_4.invoke()
    if c62_4=='1' and b62_4var.get()==0:
        b62_4.invoke()
    if c62_5=='0' and b62_5var.get()==1:
        b62_5.invoke()
    if c62_5=='1' and b62_5var.get()==0:
        b62_5.invoke()
    if c62_6=='0' and b62_6var.get()==1:
        b62_6.invoke()
    if c62_6=='1' and b62_6var.get()==0:
        b62_6.invoke()
    if c62_7=='0' and b62_7var.get()==1:
        b62_7.invoke()
    if c62_7=='1' and b62_7var.get()==0:
        b62_7.invoke()
    if c62_8=='0' and b62_8var.get()==1:
        b62_8.invoke()
    if c62_8=='1' and b62_8var.get()==0:
        b62_8.invoke()
    if c62_9=='0' and b62_9var.get()==1:
        b62_9invoke()
    if c62_9=='1' and b62_9var.get()==0:
        b62_9.invoke()
    if c62_10=='0' and b62_10var.get()==1:
        b62_10.invoke()
    if c62_10=='1' and b62_10var.get()==0:
        b62_10.invoke()
    if c62_11=='0' and b62_11var.get()==1:
        b62_11.invoke()
    if c62_11=='1' and b62_11var.get()==0:
        b62_11.invoke()
    if c62_12=='0' and b62_12var.get()==1:
        b62_12.invoke()
    if c62_12=='1' and b62_12var.get()==0:
        b62_12.invoke()
    if c62_13=='0' and b62_13var.get()==1:
        b62_13.invoke()
    if c62_13=='1' and b62_13var.get()==0:
        b62_13.invoke()
    if c62_14=='0' and b62_14var.get()==1:
        b62_14.invoke()
    if c62_14=='1' and b62_14var.get()==0:
        b62_14.invoke()
    if c62_15=='0' and b62_15var.get()==1:
        b62_15.invoke()
    if c62_15=='1' and b62_15var.get()==0:
        b62_15.invoke()
    if c62_17=='0' and b62_17var.get()==1:
        b62_17.invoke()
    if c62_17=='1' and b62_17var.get()==0:
        b62_17.invoke()
    if tr_63=='1' and trig_63var.get()==0:
        trig_63.invoke()
       
    if c63_0=='0' and b63_0var.get()==1:
        b63_0.invoke()
    if c63_0=='1' and b63_0var.get()==0:
        b63_0.invoke()
    if c63_1=='0' and b63_1var.get()==1:
        b63_1.invoke()
    if c63_1=='1' and b63_1var.get()==0:
        b63_1.invoke()
    if c63_2=='0' and b63_2var.get()==1:
        b63_2.invoke()
    if c63_2=='1' and b63_2var.get()==0:
        b63_2.invoke()
    if c63_3=='0' and b63_3var.get()==1:
        b63_3.invoke()
    if c63_3=='1' and b63_3var.get()==0:
        b63_3.invoke()
    if c63_4=='0' and b63_4var.get()==1:
        b63_4.invoke()
    if c63_4=='1' and b63_4var.get()==0:
        b63_4.invoke()
    if c63_5=='0' and b63_5var.get()==1:
        b63_5.invoke()
    if c63_5=='1' and b63_5var.get()==0:
        b63_5.invoke()
    if c63_6=='0' and b63_6var.get()==1:
        b63_6.invoke()
    if c63_6=='1' and b63_6var.get()==0:
        b63_6.invoke()
    if c63_7=='0' and b63_7var.get()==1:
        b63_7.invoke()
    if c63_7=='1' and b63_7var.get()==0:
        b63_7.invoke()
    if c63_8=='0' and b63_8var.get()==1:
        b63_8.invoke()
    if c63_8=='1' and b63_8var.get()==0:
        b63_8.invoke()
    if c63_9=='0' and b63_9var.get()==1:
        b63_9invoke()
    if c63_9=='1' and b63_9var.get()==0:
        b63_9.invoke()
    if c63_10=='0' and b63_10var.get()==1:
        b63_10.invoke()
    if c63_10=='1' and b63_10var.get()==0:
        b63_10.invoke()
    if c63_11=='0' and b63_11var.get()==1:
        b63_11.invoke()
    if c63_11=='1' and b63_11var.get()==0:
        b63_11.invoke()
    if c63_12=='0' and b63_12var.get()==1:
        b63_12.invoke()
    if c63_12=='1' and b63_12var.get()==0:
        b63_12.invoke()
    if c63_13=='0' and b63_13var.get()==1:
        b63_13.invoke()
    if c63_13=='1' and b63_13var.get()==0:
        b63_13.invoke()
    if c63_14=='0' and b63_14var.get()==1:
        b63_14.invoke()
    if c63_14=='1' and b63_14var.get()==0:
        b63_14.invoke()
    if c63_15=='0' and b63_15var.get()==1:
        b63_15.invoke()
    if c63_15=='1' and b63_15var.get()==0:
        b63_15.invoke()
    if c63_17=='0' and b63_17var.get()==1:
        b63_17.invoke()
    if c63_17=='1' and b63_17var.get()==0:
        b63_17.invoke()
    if tr_64=='1' and trig_64var.get()==0:
        trig_64.invoke()
       
    if c64_0=='0' and b64_0var.get()==1:
        b64_0.invoke()
    if c64_0=='1' and b64_0var.get()==0:
        b64_0.invoke()
    if c64_1=='0' and b64_1var.get()==1:
        b64_1.invoke()
    if c64_1=='1' and b64_1var.get()==0:
        b64_1.invoke()
    if c64_2=='0' and b64_2var.get()==1:
        b64_2.invoke()
    if c64_2=='1' and b64_2var.get()==0:
        b64_2.invoke()
    if c64_3=='0' and b64_3var.get()==1:
        b64_3.invoke()
    if c64_3=='1' and b64_3var.get()==0:
        b64_3.invoke()
    if c64_4=='0' and b64_4var.get()==1:
        b64_4.invoke()
    if c64_4=='1' and b64_4var.get()==0:
        b64_4.invoke()
    if c64_5=='0' and b64_5var.get()==1:
        b64_5.invoke()
    if c64_5=='1' and b64_5var.get()==0:
        b64_5.invoke()
    if c64_6=='0' and b64_6var.get()==1:
        b64_6.invoke()
    if c64_6=='1' and b64_6var.get()==0:
        b64_6.invoke()
    if c64_7=='0' and b64_7var.get()==1:
        b64_7.invoke()
    if c64_7=='1' and b64_7var.get()==0:
        b64_7.invoke()
    if c64_8=='0' and b64_8var.get()==1:
        b64_8.invoke()
    if c64_8=='1' and b64_8var.get()==0:
        b64_8.invoke()
    if c64_9=='0' and b64_9var.get()==1:
        b64_9invoke()
    if c64_9=='1' and b64_9var.get()==0:
        b64_9.invoke()
    if c64_10=='0' and b64_10var.get()==1:
        b64_10.invoke()
    if c64_10=='1' and b64_10var.get()==0:
        b64_10.invoke()
    if c64_11=='0' and b64_11var.get()==1:
        b64_11.invoke()
    if c64_11=='1' and b64_11var.get()==0:
        b64_11.invoke()
    if c64_12=='0' and b64_12var.get()==1:
        b64_12.invoke()
    if c64_12=='1' and b64_12var.get()==0:
        b64_12.invoke()
    if c64_13=='0' and b64_13var.get()==1:
        b64_13.invoke()
    if c64_13=='1' and b64_13var.get()==0:
        b64_13.invoke()
    if c64_14=='0' and b64_14var.get()==1:
        b64_14.invoke()
    if c64_14=='1' and b64_14var.get()==0:
        b64_14.invoke()
    if c64_15=='0' and b64_15var.get()==1:
        b64_15.invoke()
    if c64_15=='1' and b64_15var.get()==0:
        b64_15.invoke()
    if c64_17=='0' and b64_17var.get()==1:
        b64_17.invoke()
    if c64_17=='1' and b64_17var.get()==0:
        b64_17.invoke()
    if tr_65=='1' and trig_65var.get()==0:
        trig_65.invoke()
       
    if c65_0=='0' and b65_0var.get()==1:
        b65_0.invoke()
    if c65_0=='1' and b65_0var.get()==0:
        b65_0.invoke()
    if c65_1=='0' and b65_1var.get()==1:
        b65_1.invoke()
    if c65_1=='1' and b65_1var.get()==0:
        b65_1.invoke()
    if c65_2=='0' and b65_2var.get()==1:
        b65_2.invoke()
    if c65_2=='1' and b65_2var.get()==0:
        b65_2.invoke()
    if c65_3=='0' and b65_3var.get()==1:
        b65_3.invoke()
    if c65_3=='1' and b65_3var.get()==0:
        b65_3.invoke()
    if c65_4=='0' and b65_4var.get()==1:
        b65_4.invoke()
    if c65_4=='1' and b65_4var.get()==0:
        b65_4.invoke()
    if c65_5=='0' and b65_5var.get()==1:
        b65_5.invoke()
    if c65_5=='1' and b65_5var.get()==0:
        b65_5.invoke()
    if c65_6=='0' and b65_6var.get()==1:
        b65_6.invoke()
    if c65_6=='1' and b65_6var.get()==0:
        b65_6.invoke()
    if c65_7=='0' and b65_7var.get()==1:
        b65_7.invoke()
    if c65_7=='1' and b65_7var.get()==0:
        b65_7.invoke()
    if c65_8=='0' and b65_8var.get()==1:
        b65_8.invoke()
    if c65_8=='1' and b65_8var.get()==0:
        b65_8.invoke()
    if c65_9=='0' and b65_9var.get()==1:
        b65_9invoke()
    if c65_9=='1' and b65_9var.get()==0:
        b65_9.invoke()
    if c65_10=='0' and b65_10var.get()==1:
        b65_10.invoke()
    if c65_10=='1' and b65_10var.get()==0:
        b65_10.invoke()
    if c65_11=='0' and b65_11var.get()==1:
        b65_11.invoke()
    if c65_11=='1' and b65_11var.get()==0:
        b65_11.invoke()
    if c65_12=='0' and b65_12var.get()==1:
        b65_12.invoke()
    if c65_12=='1' and b65_12var.get()==0:
        b65_12.invoke()
    if c65_13=='0' and b65_13var.get()==1:
        b65_13.invoke()
    if c65_13=='1' and b65_13var.get()==0:
        b65_13.invoke()
    if c65_14=='0' and b65_14var.get()==1:
        b65_14.invoke()
    if c65_14=='1' and b65_14var.get()==0:
        b65_14.invoke()
    if c65_15=='0' and b65_15var.get()==1:
        b65_15.invoke()
    if c65_15=='1' and b65_15var.get()==0:
        b65_15.invoke()
    if c65_17=='0' and b65_17var.get()==1:
        b65_17.invoke()
    if c65_17=='1' and b65_17var.get()==0:
        b65_17.invoke()
    if tr_66=='1' and trig_66var.get()==0:
        trig_66.invoke()
       
    if c66_0=='0' and b66_0var.get()==1:
        b66_0.invoke()
    if c66_0=='1' and b66_0var.get()==0:
        b66_0.invoke()
    if c66_1=='0' and b66_1var.get()==1:
        b66_1.invoke()
    if c66_1=='1' and b66_1var.get()==0:
        b66_1.invoke()
    if c66_2=='0' and b66_2var.get()==1:
        b66_2.invoke()
    if c66_2=='1' and b66_2var.get()==0:
        b66_2.invoke()
    if c66_3=='0' and b66_3var.get()==1:
        b66_3.invoke()
    if c66_3=='1' and b66_3var.get()==0:
        b66_3.invoke()
    if c66_4=='0' and b66_4var.get()==1:
        b66_4.invoke()
    if c66_4=='1' and b66_4var.get()==0:
        b66_4.invoke()
    if c66_5=='0' and b66_5var.get()==1:
        b66_5.invoke()
    if c66_5=='1' and b66_5var.get()==0:
        b66_5.invoke()
    if c66_6=='0' and b66_6var.get()==1:
        b66_6.invoke()
    if c66_6=='1' and b66_6var.get()==0:
        b66_6.invoke()
    if c66_7=='0' and b66_7var.get()==1:
        b66_7.invoke()
    if c66_7=='1' and b66_7var.get()==0:
        b66_7.invoke()
    if c66_8=='0' and b66_8var.get()==1:
        b66_8.invoke()
    if c66_8=='1' and b66_8var.get()==0:
        b66_8.invoke()
    if c66_9=='0' and b66_9var.get()==1:
        b66_9invoke()
    if c66_9=='1' and b66_9var.get()==0:
        b66_9.invoke()
    if c66_10=='0' and b66_10var.get()==1:
        b66_10.invoke()
    if c66_10=='1' and b66_10var.get()==0:
        b66_10.invoke()
    if c66_11=='0' and b66_11var.get()==1:
        b66_11.invoke()
    if c66_11=='1' and b66_11var.get()==0:
        b66_11.invoke()
    if c66_12=='0' and b66_12var.get()==1:
        b66_12.invoke()
    if c66_12=='1' and b66_12var.get()==0:
        b66_12.invoke()
    if c66_13=='0' and b66_13var.get()==1:
        b66_13.invoke()
    if c66_13=='1' and b66_13var.get()==0:
        b66_13.invoke()
    if c66_14=='0' and b66_14var.get()==1:
        b66_14.invoke()
    if c66_14=='1' and b66_14var.get()==0:
        b66_14.invoke()
    if c66_15=='0' and b66_15var.get()==1:
        b66_15.invoke()
    if c66_15=='1' and b66_15var.get()==0:
        b66_15.invoke()
    if c66_17=='0' and b66_17var.get()==1:
        b66_17.invoke()
    if c66_17=='1' and b66_17var.get()==0:
        b66_17.invoke()
    if tr_67=='1' and trig_67var.get()==0:
        trig_67.invoke()
       
    if c67_0=='0' and b67_0var.get()==1:
        b67_0.invoke()
    if c67_0=='1' and b67_0var.get()==0:
        b67_0.invoke()
    if c67_1=='0' and b67_1var.get()==1:
        b67_1.invoke()
    if c67_1=='1' and b67_1var.get()==0:
        b67_1.invoke()
    if c67_2=='0' and b67_2var.get()==1:
        b67_2.invoke()
    if c67_2=='1' and b67_2var.get()==0:
        b67_2.invoke()
    if c67_3=='0' and b67_3var.get()==1:
        b67_3.invoke()
    if c67_3=='1' and b67_3var.get()==0:
        b67_3.invoke()
    if c67_4=='0' and b67_4var.get()==1:
        b67_4.invoke()
    if c67_4=='1' and b67_4var.get()==0:
        b67_4.invoke()
    if c67_5=='0' and b67_5var.get()==1:
        b67_5.invoke()
    if c67_5=='1' and b67_5var.get()==0:
        b67_5.invoke()
    if c67_6=='0' and b67_6var.get()==1:
        b67_6.invoke()
    if c67_6=='1' and b67_6var.get()==0:
        b67_6.invoke()
    if c67_7=='0' and b67_7var.get()==1:
        b67_7.invoke()
    if c67_7=='1' and b67_7var.get()==0:
        b67_7.invoke()
    if c67_8=='0' and b67_8var.get()==1:
        b67_8.invoke()
    if c67_8=='1' and b67_8var.get()==0:
        b67_8.invoke()
    if c67_9=='0' and b67_9var.get()==1:
        b67_9invoke()
    if c67_9=='1' and b67_9var.get()==0:
        b67_9.invoke()
    if c67_10=='0' and b67_10var.get()==1:
        b67_10.invoke()
    if c67_10=='1' and b67_10var.get()==0:
        b67_10.invoke()
    if c67_11=='0' and b67_11var.get()==1:
        b67_11.invoke()
    if c67_11=='1' and b67_11var.get()==0:
        b67_11.invoke()
    if c67_12=='0' and b67_12var.get()==1:
        b67_12.invoke()
    if c67_12=='1' and b67_12var.get()==0:
        b67_12.invoke()
    if c67_13=='0' and b67_13var.get()==1:
        b67_13.invoke()
    if c67_13=='1' and b67_13var.get()==0:
        b67_13.invoke()
    if c67_14=='0' and b67_14var.get()==1:
        b67_14.invoke()
    if c67_14=='1' and b67_14var.get()==0:
        b67_14.invoke()
    if c67_15=='0' and b67_15var.get()==1:
        b67_15.invoke()
    if c67_15=='1' and b67_15var.get()==0:
        b67_15.invoke()
    if c67_17=='0' and b67_17var.get()==1:
        b67_17.invoke()
    if c67_17=='1' and b67_17var.get()==0:
        b67_17.invoke()
    if tr_68=='1' and trig_68var.get()==0:
        trig_68.invoke()
       
    if c68_0=='0' and b68_0var.get()==1:
        b68_0.invoke()
    if c68_0=='1' and b68_0var.get()==0:
        b68_0.invoke()
    if c68_1=='0' and b68_1var.get()==1:
        b68_1.invoke()
    if c68_1=='1' and b68_1var.get()==0:
        b68_1.invoke()
    if c68_2=='0' and b68_2var.get()==1:
        b68_2.invoke()
    if c68_2=='1' and b68_2var.get()==0:
        b68_2.invoke()
    if c68_3=='0' and b68_3var.get()==1:
        b68_3.invoke()
    if c68_3=='1' and b68_3var.get()==0:
        b68_3.invoke()
    if c68_4=='0' and b68_4var.get()==1:
        b68_4.invoke()
    if c68_4=='1' and b68_4var.get()==0:
        b68_4.invoke()
    if c68_5=='0' and b68_5var.get()==1:
        b68_5.invoke()
    if c68_5=='1' and b68_5var.get()==0:
        b68_5.invoke()
    if c68_6=='0' and b68_6var.get()==1:
        b68_6.invoke()
    if c68_6=='1' and b68_6var.get()==0:
        b68_6.invoke()
    if c68_7=='0' and b68_7var.get()==1:
        b68_7.invoke()
    if c68_7=='1' and b68_7var.get()==0:
        b68_7.invoke()
    if c68_8=='0' and b68_8var.get()==1:
        b68_8.invoke()
    if c68_8=='1' and b68_8var.get()==0:
        b68_8.invoke()
    if c68_9=='0' and b68_9var.get()==1:
        b68_9invoke()
    if c68_9=='1' and b68_9var.get()==0:
        b68_9.invoke()
    if c68_10=='0' and b68_10var.get()==1:
        b68_10.invoke()
    if c68_10=='1' and b68_10var.get()==0:
        b68_10.invoke()
    if c68_11=='0' and b68_11var.get()==1:
        b68_11.invoke()
    if c68_11=='1' and b68_11var.get()==0:
        b68_11.invoke()
    if c68_12=='0' and b68_12var.get()==1:
        b68_12.invoke()
    if c68_12=='1' and b68_12var.get()==0:
        b68_12.invoke()
    if c68_13=='0' and b68_13var.get()==1:
        b68_13.invoke()
    if c68_13=='1' and b68_13var.get()==0:
        b68_13.invoke()
    if c68_14=='0' and b68_14var.get()==1:
        b68_14.invoke()
    if c68_14=='1' and b68_14var.get()==0:
        b68_14.invoke()
    if c68_15=='0' and b68_15var.get()==1:
        b68_15.invoke()
    if c68_15=='1' and b68_15var.get()==0:
        b68_15.invoke()
    if c68_17=='0' and b68_17var.get()==1:
        b68_17.invoke()
    if c68_17=='1' and b68_17var.get()==0:
        b68_17.invoke()
    if tr_69=='1' and trig_69var.get()==0:
        trig_69.invoke()
       
    if c69_0=='0' and b69_0var.get()==1:
        b69_0.invoke()
    if c69_0=='1' and b69_0var.get()==0:
        b69_0.invoke()
    if c69_1=='0' and b69_1var.get()==1:
        b69_1.invoke()
    if c69_1=='1' and b69_1var.get()==0:
        b69_1.invoke()
    if c69_2=='0' and b69_2var.get()==1:
        b69_2.invoke()
    if c69_2=='1' and b69_2var.get()==0:
        b69_2.invoke()
    if c69_3=='0' and b69_3var.get()==1:
        b69_3.invoke()
    if c69_3=='1' and b69_3var.get()==0:
        b69_3.invoke()
    if c69_4=='0' and b69_4var.get()==1:
        b69_4.invoke()
    if c69_4=='1' and b69_4var.get()==0:
        b69_4.invoke()
    if c69_5=='0' and b69_5var.get()==1:
        b69_5.invoke()
    if c69_5=='1' and b69_5var.get()==0:
        b69_5.invoke()
    if c69_6=='0' and b69_6var.get()==1:
        b69_6.invoke()
    if c69_6=='1' and b69_6var.get()==0:
        b69_6.invoke()
    if c69_7=='0' and b69_7var.get()==1:
        b69_7.invoke()
    if c69_7=='1' and b69_7var.get()==0:
        b69_7.invoke()
    if c69_8=='0' and b69_8var.get()==1:
        b69_8.invoke()
    if c69_8=='1' and b69_8var.get()==0:
        b69_8.invoke()
    if c69_9=='0' and b69_9var.get()==1:
        b69_9invoke()
    if c69_9=='1' and b69_9var.get()==0:
        b69_9.invoke()
    if c69_10=='0' and b69_10var.get()==1:
        b69_10.invoke()
    if c69_10=='1' and b69_10var.get()==0:
        b69_10.invoke()
    if c69_11=='0' and b69_11var.get()==1:
        b69_11.invoke()
    if c69_11=='1' and b69_11var.get()==0:
        b69_11.invoke()
    if c69_12=='0' and b69_12var.get()==1:
        b69_12.invoke()
    if c69_12=='1' and b69_12var.get()==0:
        b69_12.invoke()
    if c69_13=='0' and b69_13var.get()==1:
        b69_13.invoke()
    if c69_13=='1' and b69_13var.get()==0:
        b69_13.invoke()
    if c69_14=='0' and b69_14var.get()==1:
        b69_14.invoke()
    if c69_14=='1' and b69_14var.get()==0:
        b69_14.invoke()
    if c69_15=='0' and b69_15var.get()==1:
        b69_15.invoke()
    if c69_15=='1' and b69_15var.get()==0:
        b69_15.invoke()
    if c69_17=='0' and b69_17var.get()==1:
        b69_17.invoke()
    if c69_17=='1' and b69_17var.get()==0:
        b69_17.invoke()
    if tr_70=='1' and trig_70var.get()==0:
        trig_70.invoke()
       
    if c70_0=='0' and b70_0var.get()==1:
        b70_0.invoke()
    if c70_0=='1' and b70_0var.get()==0:
        b70_0.invoke()
    if c70_1=='0' and b70_1var.get()==1:
        b70_1.invoke()
    if c70_1=='1' and b70_1var.get()==0:
        b70_1.invoke()
    if c70_2=='0' and b70_2var.get()==1:
        b70_2.invoke()
    if c70_2=='1' and b70_2var.get()==0:
        b70_2.invoke()
    if c70_3=='0' and b70_3var.get()==1:
        b70_3.invoke()
    if c70_3=='1' and b70_3var.get()==0:
        b70_3.invoke()
    if c70_4=='0' and b70_4var.get()==1:
        b70_4.invoke()
    if c70_4=='1' and b70_4var.get()==0:
        b70_4.invoke()
    if c70_5=='0' and b70_5var.get()==1:
        b70_5.invoke()
    if c70_5=='1' and b70_5var.get()==0:
        b70_5.invoke()
    if c70_6=='0' and b70_6var.get()==1:
        b70_6.invoke()
    if c70_6=='1' and b70_6var.get()==0:
        b70_6.invoke()
    if c70_7=='0' and b70_7var.get()==1:
        b70_7.invoke()
    if c70_7=='1' and b70_7var.get()==0:
        b70_7.invoke()
    if c70_8=='0' and b70_8var.get()==1:
        b70_8.invoke()
    if c70_8=='1' and b70_8var.get()==0:
        b70_8.invoke()
    if c70_9=='0' and b70_9var.get()==1:
        b70_9invoke()
    if c70_9=='1' and b70_9var.get()==0:
        b70_9.invoke()
    if c70_10=='0' and b70_10var.get()==1:
        b70_10.invoke()
    if c70_10=='1' and b70_10var.get()==0:
        b70_10.invoke()
    if c70_11=='0' and b70_11var.get()==1:
        b70_11.invoke()
    if c70_11=='1' and b70_11var.get()==0:
        b70_11.invoke()
    if c70_12=='0' and b70_12var.get()==1:
        b70_12.invoke()
    if c70_12=='1' and b70_12var.get()==0:
        b70_12.invoke()
    if c70_13=='0' and b70_13var.get()==1:
        b70_13.invoke()
    if c70_13=='1' and b70_13var.get()==0:
        b70_13.invoke()
    if c70_14=='0' and b70_14var.get()==1:
        b70_14.invoke()
    if c70_14=='1' and b70_14var.get()==0:
        b70_14.invoke()
    if c70_15=='0' and b70_15var.get()==1:
        b70_15.invoke()
    if c70_15=='1' and b70_15var.get()==0:
        b70_15.invoke()
    if c70_17=='0' and b70_17var.get()==1:
        b70_17.invoke()
    if c70_17=='1' and b70_17var.get()==0:
        b70_17.invoke()
    if tr_71=='1' and trig_71var.get()==0:
        trig_71.invoke()
       
    if c71_0=='0' and b71_0var.get()==1:
        b71_0.invoke()
    if c71_0=='1' and b71_0var.get()==0:
        b71_0.invoke()
    if c71_1=='0' and b71_1var.get()==1:
        b71_1.invoke()
    if c71_1=='1' and b71_1var.get()==0:
        b71_1.invoke()
    if c71_2=='0' and b71_2var.get()==1:
        b71_2.invoke()
    if c71_2=='1' and b71_2var.get()==0:
        b71_2.invoke()
    if c71_3=='0' and b71_3var.get()==1:
        b71_3.invoke()
    if c71_3=='1' and b71_3var.get()==0:
        b71_3.invoke()
    if c71_4=='0' and b71_4var.get()==1:
        b71_4.invoke()
    if c71_4=='1' and b71_4var.get()==0:
        b71_4.invoke()
    if c71_5=='0' and b71_5var.get()==1:
        b71_5.invoke()
    if c71_5=='1' and b71_5var.get()==0:
        b71_5.invoke()
    if c71_6=='0' and b71_6var.get()==1:
        b71_6.invoke()
    if c71_6=='1' and b71_6var.get()==0:
        b71_6.invoke()
    if c71_7=='0' and b71_7var.get()==1:
        b71_7.invoke()
    if c71_7=='1' and b71_7var.get()==0:
        b71_7.invoke()
    if c71_8=='0' and b71_8var.get()==1:
        b71_8.invoke()
    if c71_8=='1' and b71_8var.get()==0:
        b71_8.invoke()
    if c71_9=='0' and b71_9var.get()==1:
        b71_9invoke()
    if c71_9=='1' and b71_9var.get()==0:
        b71_9.invoke()
    if c71_10=='0' and b71_10var.get()==1:
        b71_10.invoke()
    if c71_10=='1' and b71_10var.get()==0:
        b71_10.invoke()
    if c71_11=='0' and b71_11var.get()==1:
        b71_11.invoke()
    if c71_11=='1' and b71_11var.get()==0:
        b71_11.invoke()
    if c71_12=='0' and b71_12var.get()==1:
        b71_12.invoke()
    if c71_12=='1' and b71_12var.get()==0:
        b71_12.invoke()
    if c71_13=='0' and b71_13var.get()==1:
        b71_13.invoke()
    if c71_13=='1' and b71_13var.get()==0:
        b71_13.invoke()
    if c71_14=='0' and b71_14var.get()==1:
        b71_14.invoke()
    if c71_14=='1' and b71_14var.get()==0:
        b71_14.invoke()
    if c71_15=='0' and b71_15var.get()==1:
        b71_15.invoke()
    if c71_15=='1' and b71_15var.get()==0:
        b71_15.invoke()
    if c71_17=='0' and b71_17var.get()==1:
        b71_17.invoke()
    if c71_17=='1' and b71_17var.get()==0:
        b71_17.invoke()
    if tr_72=='1' and trig_72var.get()==0:
        trig_72.invoke()
       
    if c72_0=='0' and b72_0var.get()==1:
        b72_0.invoke()
    if c72_0=='1' and b72_0var.get()==0:
        b72_0.invoke()
    if c72_1=='0' and b72_1var.get()==1:
        b72_1.invoke()
    if c72_1=='1' and b72_1var.get()==0:
        b72_1.invoke()
    if c72_2=='0' and b72_2var.get()==1:
        b72_2.invoke()
    if c72_2=='1' and b72_2var.get()==0:
        b72_2.invoke()
    if c72_3=='0' and b72_3var.get()==1:
        b72_3.invoke()
    if c72_3=='1' and b72_3var.get()==0:
        b72_3.invoke()
    if c72_4=='0' and b72_4var.get()==1:
        b72_4.invoke()
    if c72_4=='1' and b72_4var.get()==0:
        b72_4.invoke()
    if c72_5=='0' and b72_5var.get()==1:
        b72_5.invoke()
    if c72_5=='1' and b72_5var.get()==0:
        b72_5.invoke()
    if c72_6=='0' and b72_6var.get()==1:
        b72_6.invoke()
    if c72_6=='1' and b72_6var.get()==0:
        b72_6.invoke()
    if c72_7=='0' and b72_7var.get()==1:
        b72_7.invoke()
    if c72_7=='1' and b72_7var.get()==0:
        b72_7.invoke()
    if c72_8=='0' and b72_8var.get()==1:
        b72_8.invoke()
    if c72_8=='1' and b72_8var.get()==0:
        b72_8.invoke()
    if c72_9=='0' and b72_9var.get()==1:
        b72_9invoke()
    if c72_9=='1' and b72_9var.get()==0:
        b72_9.invoke()
    if c72_10=='0' and b72_10var.get()==1:
        b72_10.invoke()
    if c72_10=='1' and b72_10var.get()==0:
        b72_10.invoke()
    if c72_11=='0' and b72_11var.get()==1:
        b72_11.invoke()
    if c72_11=='1' and b72_11var.get()==0:
        b72_11.invoke()
    if c72_12=='0' and b72_12var.get()==1:
        b72_12.invoke()
    if c72_12=='1' and b72_12var.get()==0:
        b72_12.invoke()
    if c72_13=='0' and b72_13var.get()==1:
        b72_13.invoke()
    if c72_13=='1' and b72_13var.get()==0:
        b72_13.invoke()
    if c72_14=='0' and b72_14var.get()==1:
        b72_14.invoke()
    if c72_14=='1' and b72_14var.get()==0:
        b72_14.invoke()
    if c72_15=='0' and b72_15var.get()==1:
        b72_15.invoke()
    if c72_15=='1' and b72_15var.get()==0:
        b72_15.invoke()
    if c72_17=='0' and b72_17var.get()==1:
        b72_17.invoke()
    if c72_17=='1' and b72_17var.get()==0:
        b72_17.invoke()
    if tr_73=='1' and trig_73var.get()==0:
        trig_73.invoke()
       
    if c73_0=='0' and b73_0var.get()==1:
        b73_0.invoke()
    if c73_0=='1' and b73_0var.get()==0:
        b73_0.invoke()
    if c73_1=='0' and b73_1var.get()==1:
        b73_1.invoke()
    if c73_1=='1' and b73_1var.get()==0:
        b73_1.invoke()
    if c73_2=='0' and b73_2var.get()==1:
        b73_2.invoke()
    if c73_2=='1' and b73_2var.get()==0:
        b73_2.invoke()
    if c73_3=='0' and b73_3var.get()==1:
        b73_3.invoke()
    if c73_3=='1' and b73_3var.get()==0:
        b73_3.invoke()
    if c73_4=='0' and b73_4var.get()==1:
        b73_4.invoke()
    if c73_4=='1' and b73_4var.get()==0:
        b73_4.invoke()
    if c73_5=='0' and b73_5var.get()==1:
        b73_5.invoke()
    if c73_5=='1' and b73_5var.get()==0:
        b73_5.invoke()
    if c73_6=='0' and b73_6var.get()==1:
        b73_6.invoke()
    if c73_6=='1' and b73_6var.get()==0:
        b73_6.invoke()
    if c73_7=='0' and b73_7var.get()==1:
        b73_7.invoke()
    if c73_7=='1' and b73_7var.get()==0:
        b73_7.invoke()
    if c73_8=='0' and b73_8var.get()==1:
        b73_8.invoke()
    if c73_8=='1' and b73_8var.get()==0:
        b73_8.invoke()
    if c73_9=='0' and b73_9var.get()==1:
        b73_9invoke()
    if c73_9=='1' and b73_9var.get()==0:
        b73_9.invoke()
    if c73_10=='0' and b73_10var.get()==1:
        b73_10.invoke()
    if c73_10=='1' and b73_10var.get()==0:
        b73_10.invoke()
    if c73_11=='0' and b73_11var.get()==1:
        b73_11.invoke()
    if c73_11=='1' and b73_11var.get()==0:
        b73_11.invoke()
    if c73_12=='0' and b73_12var.get()==1:
        b73_12.invoke()
    if c73_12=='1' and b73_12var.get()==0:
        b73_12.invoke()
    if c73_13=='0' and b73_13var.get()==1:
        b73_13.invoke()
    if c73_13=='1' and b73_13var.get()==0:
        b73_13.invoke()
    if c73_14=='0' and b73_14var.get()==1:
        b73_14.invoke()
    if c73_14=='1' and b73_14var.get()==0:
        b73_14.invoke()
    if c73_15=='0' and b73_15var.get()==1:
        b73_15.invoke()
    if c73_15=='1' and b73_15var.get()==0:
        b73_15.invoke()
    if c73_17=='0' and b73_17var.get()==1:
        b73_17.invoke()
    if c73_17=='1' and b73_17var.get()==0:
        b73_17.invoke()
    if tr_74=='1' and trig_74var.get()==0:
        trig_74.invoke()
       
    if c74_0=='0' and b74_0var.get()==1:
        b74_0.invoke()
    if c74_0=='1' and b74_0var.get()==0:
        b74_0.invoke()
    if c74_1=='0' and b74_1var.get()==1:
        b74_1.invoke()
    if c74_1=='1' and b74_1var.get()==0:
        b74_1.invoke()
    if c74_2=='0' and b74_2var.get()==1:
        b74_2.invoke()
    if c74_2=='1' and b74_2var.get()==0:
        b74_2.invoke()
    if c74_3=='0' and b74_3var.get()==1:
        b74_3.invoke()
    if c74_3=='1' and b74_3var.get()==0:
        b74_3.invoke()
    if c74_4=='0' and b74_4var.get()==1:
        b74_4.invoke()
    if c74_4=='1' and b74_4var.get()==0:
        b74_4.invoke()
    if c74_5=='0' and b74_5var.get()==1:
        b74_5.invoke()
    if c74_5=='1' and b74_5var.get()==0:
        b74_5.invoke()
    if c74_6=='0' and b74_6var.get()==1:
        b74_6.invoke()
    if c74_6=='1' and b74_6var.get()==0:
        b74_6.invoke()
    if c74_7=='0' and b74_7var.get()==1:
        b74_7.invoke()
    if c74_7=='1' and b74_7var.get()==0:
        b74_7.invoke()
    if c74_8=='0' and b74_8var.get()==1:
        b74_8.invoke()
    if c74_8=='1' and b74_8var.get()==0:
        b74_8.invoke()
    if c74_9=='0' and b74_9var.get()==1:
        b74_9invoke()
    if c74_9=='1' and b74_9var.get()==0:
        b74_9.invoke()
    if c74_10=='0' and b74_10var.get()==1:
        b74_10.invoke()
    if c74_10=='1' and b74_10var.get()==0:
        b74_10.invoke()
    if c74_11=='0' and b74_11var.get()==1:
        b74_11.invoke()
    if c74_11=='1' and b74_11var.get()==0:
        b74_11.invoke()
    if c74_12=='0' and b74_12var.get()==1:
        b74_12.invoke()
    if c74_12=='1' and b74_12var.get()==0:
        b74_12.invoke()
    if c74_13=='0' and b74_13var.get()==1:
        b74_13.invoke()
    if c74_13=='1' and b74_13var.get()==0:
        b74_13.invoke()
    if c74_14=='0' and b74_14var.get()==1:
        b74_14.invoke()
    if c74_14=='1' and b74_14var.get()==0:
        b74_14.invoke()
    if c74_15=='0' and b74_15var.get()==1:
        b74_15.invoke()
    if c74_15=='1' and b74_15var.get()==0:
        b74_15.invoke()
    if c74_17=='0' and b74_17var.get()==1:
        b74_17.invoke()
    if c74_17=='1' and b74_17var.get()==0:
        b74_17.invoke()
    if tr_75=='1' and trig_75var.get()==0:
        trig_75.invoke()
       
    if c75_0=='0' and b75_0var.get()==1:
        b75_0.invoke()
    if c75_0=='1' and b75_0var.get()==0:
        b75_0.invoke()
    if c75_1=='0' and b75_1var.get()==1:
        b75_1.invoke()
    if c75_1=='1' and b75_1var.get()==0:
        b75_1.invoke()
    if c75_2=='0' and b75_2var.get()==1:
        b75_2.invoke()
    if c75_2=='1' and b75_2var.get()==0:
        b75_2.invoke()
    if c75_3=='0' and b75_3var.get()==1:
        b75_3.invoke()
    if c75_3=='1' and b75_3var.get()==0:
        b75_3.invoke()
    if c75_4=='0' and b75_4var.get()==1:
        b75_4.invoke()
    if c75_4=='1' and b75_4var.get()==0:
        b75_4.invoke()
    if c75_5=='0' and b75_5var.get()==1:
        b75_5.invoke()
    if c75_5=='1' and b75_5var.get()==0:
        b75_5.invoke()
    if c75_6=='0' and b75_6var.get()==1:
        b75_6.invoke()
    if c75_6=='1' and b75_6var.get()==0:
        b75_6.invoke()
    if c75_7=='0' and b75_7var.get()==1:
        b75_7.invoke()
    if c75_7=='1' and b75_7var.get()==0:
        b75_7.invoke()
    if c75_8=='0' and b75_8var.get()==1:
        b75_8.invoke()
    if c75_8=='1' and b75_8var.get()==0:
        b75_8.invoke()
    if c75_9=='0' and b75_9var.get()==1:
        b75_9invoke()
    if c75_9=='1' and b75_9var.get()==0:
        b75_9.invoke()
    if c75_10=='0' and b75_10var.get()==1:
        b75_10.invoke()
    if c75_10=='1' and b75_10var.get()==0:
        b75_10.invoke()
    if c75_11=='0' and b75_11var.get()==1:
        b75_11.invoke()
    if c75_11=='1' and b75_11var.get()==0:
        b75_11.invoke()
    if c75_12=='0' and b75_12var.get()==1:
        b75_12.invoke()
    if c75_12=='1' and b75_12var.get()==0:
        b75_12.invoke()
    if c75_13=='0' and b75_13var.get()==1:
        b75_13.invoke()
    if c75_13=='1' and b75_13var.get()==0:
        b75_13.invoke()
    if c75_14=='0' and b75_14var.get()==1:
        b75_14.invoke()
    if c75_14=='1' and b75_14var.get()==0:
        b75_14.invoke()
    if c75_15=='0' and b75_15var.get()==1:
        b75_15.invoke()
    if c75_15=='1' and b75_15var.get()==0:
        b75_15.invoke()
    if c75_17=='0' and b75_17var.get()==1:
        b75_17.invoke()
    if c75_17=='1' and b75_17var.get()==0:
        b75_17.invoke()
    if tr_76=='1' and trig_76var.get()==0:
        trig_76.invoke()
       
    if c76_0=='0' and b76_0var.get()==1:
        b76_0.invoke()
    if c76_0=='1' and b76_0var.get()==0:
        b76_0.invoke()
    if c76_1=='0' and b76_1var.get()==1:
        b76_1.invoke()
    if c76_1=='1' and b76_1var.get()==0:
        b76_1.invoke()
    if c76_2=='0' and b76_2var.get()==1:
        b76_2.invoke()
    if c76_2=='1' and b76_2var.get()==0:
        b76_2.invoke()
    if c76_3=='0' and b76_3var.get()==1:
        b76_3.invoke()
    if c76_3=='1' and b76_3var.get()==0:
        b76_3.invoke()
    if c76_4=='0' and b76_4var.get()==1:
        b76_4.invoke()
    if c76_4=='1' and b76_4var.get()==0:
        b76_4.invoke()
    if c76_5=='0' and b76_5var.get()==1:
        b76_5.invoke()
    if c76_5=='1' and b76_5var.get()==0:
        b76_5.invoke()
    if c76_6=='0' and b76_6var.get()==1:
        b76_6.invoke()
    if c76_6=='1' and b76_6var.get()==0:
        b76_6.invoke()
    if c76_7=='0' and b76_7var.get()==1:
        b76_7.invoke()
    if c76_7=='1' and b76_7var.get()==0:
        b76_7.invoke()
    if c76_8=='0' and b76_8var.get()==1:
        b76_8.invoke()
    if c76_8=='1' and b76_8var.get()==0:
        b76_8.invoke()
    if c76_9=='0' and b76_9var.get()==1:
        b76_9invoke()
    if c76_9=='1' and b76_9var.get()==0:
        b76_9.invoke()
    if c76_10=='0' and b76_10var.get()==1:
        b76_10.invoke()
    if c76_10=='1' and b76_10var.get()==0:
        b76_10.invoke()
    if c76_11=='0' and b76_11var.get()==1:
        b76_11.invoke()
    if c76_11=='1' and b76_11var.get()==0:
        b76_11.invoke()
    if c76_12=='0' and b76_12var.get()==1:
        b76_12.invoke()
    if c76_12=='1' and b76_12var.get()==0:
        b76_12.invoke()
    if c76_13=='0' and b76_13var.get()==1:
        b76_13.invoke()
    if c76_13=='1' and b76_13var.get()==0:
        b76_13.invoke()
    if c76_14=='0' and b76_14var.get()==1:
        b76_14.invoke()
    if c76_14=='1' and b76_14var.get()==0:
        b76_14.invoke()
    if c76_15=='0' and b76_15var.get()==1:
        b76_15.invoke()
    if c76_15=='1' and b76_15var.get()==0:
        b76_15.invoke()
    if c76_17=='0' and b76_17var.get()==1:
        b76_17.invoke()
    if c76_17=='1' and b76_17var.get()==0:
        b76_17.invoke()
    if tr_77=='1' and trig_77var.get()==0:
        trig_77.invoke()
       
    if c77_0=='0' and b77_0var.get()==1:
        b77_0.invoke()
    if c77_0=='1' and b77_0var.get()==0:
        b77_0.invoke()
    if c77_1=='0' and b77_1var.get()==1:
        b77_1.invoke()
    if c77_1=='1' and b77_1var.get()==0:
        b77_1.invoke()
    if c77_2=='0' and b77_2var.get()==1:
        b77_2.invoke()
    if c77_2=='1' and b77_2var.get()==0:
        b77_2.invoke()
    if c77_3=='0' and b77_3var.get()==1:
        b77_3.invoke()
    if c77_3=='1' and b77_3var.get()==0:
        b77_3.invoke()
    if c77_4=='0' and b77_4var.get()==1:
        b77_4.invoke()
    if c77_4=='1' and b77_4var.get()==0:
        b77_4.invoke()
    if c77_5=='0' and b77_5var.get()==1:
        b77_5.invoke()
    if c77_5=='1' and b77_5var.get()==0:
        b77_5.invoke()
    if c77_6=='0' and b77_6var.get()==1:
        b77_6.invoke()
    if c77_6=='1' and b77_6var.get()==0:
        b77_6.invoke()
    if c77_7=='0' and b77_7var.get()==1:
        b77_7.invoke()
    if c77_7=='1' and b77_7var.get()==0:
        b77_7.invoke()
    if c77_8=='0' and b77_8var.get()==1:
        b77_8.invoke()
    if c77_8=='1' and b77_8var.get()==0:
        b77_8.invoke()
    if c77_9=='0' and b77_9var.get()==1:
        b77_9invoke()
    if c77_9=='1' and b77_9var.get()==0:
        b77_9.invoke()
    if c77_10=='0' and b77_10var.get()==1:
        b77_10.invoke()
    if c77_10=='1' and b77_10var.get()==0:
        b77_10.invoke()
    if c77_11=='0' and b77_11var.get()==1:
        b77_11.invoke()
    if c77_11=='1' and b77_11var.get()==0:
        b77_11.invoke()
    if c77_12=='0' and b77_12var.get()==1:
        b77_12.invoke()
    if c77_12=='1' and b77_12var.get()==0:
        b77_12.invoke()
    if c77_13=='0' and b77_13var.get()==1:
        b77_13.invoke()
    if c77_13=='1' and b77_13var.get()==0:
        b77_13.invoke()
    if c77_14=='0' and b77_14var.get()==1:
        b77_14.invoke()
    if c77_14=='1' and b77_14var.get()==0:
        b77_14.invoke()
    if c77_15=='0' and b77_15var.get()==1:
        b77_15.invoke()
    if c77_15=='1' and b77_15var.get()==0:
        b77_15.invoke()
    if c77_17=='0' and b77_17var.get()==1:
        b77_17.invoke()
    if c77_17=='1' and b77_17var.get()==0:
        b77_17.invoke()
    if tr_78=='1' and trig_78var.get()==0:
        trig_78.invoke()
       
    if c78_0=='0' and b78_0var.get()==1:
        b78_0.invoke()
    if c78_0=='1' and b78_0var.get()==0:
        b78_0.invoke()
    if c78_1=='0' and b78_1var.get()==1:
        b78_1.invoke()
    if c78_1=='1' and b78_1var.get()==0:
        b78_1.invoke()
    if c78_2=='0' and b78_2var.get()==1:
        b78_2.invoke()
    if c78_2=='1' and b78_2var.get()==0:
        b78_2.invoke()
    if c78_3=='0' and b78_3var.get()==1:
        b78_3.invoke()
    if c78_3=='1' and b78_3var.get()==0:
        b78_3.invoke()
    if c78_4=='0' and b78_4var.get()==1:
        b78_4.invoke()
    if c78_4=='1' and b78_4var.get()==0:
        b78_4.invoke()
    if c78_5=='0' and b78_5var.get()==1:
        b78_5.invoke()
    if c78_5=='1' and b78_5var.get()==0:
        b78_5.invoke()
    if c78_6=='0' and b78_6var.get()==1:
        b78_6.invoke()
    if c78_6=='1' and b78_6var.get()==0:
        b78_6.invoke()
    if c78_7=='0' and b78_7var.get()==1:
        b78_7.invoke()
    if c78_7=='1' and b78_7var.get()==0:
        b78_7.invoke()
    if c78_8=='0' and b78_8var.get()==1:
        b78_8.invoke()
    if c78_8=='1' and b78_8var.get()==0:
        b78_8.invoke()
    if c78_9=='0' and b78_9var.get()==1:
        b78_9invoke()
    if c78_9=='1' and b78_9var.get()==0:
        b78_9.invoke()
    if c78_10=='0' and b78_10var.get()==1:
        b78_10.invoke()
    if c78_10=='1' and b78_10var.get()==0:
        b78_10.invoke()
    if c78_11=='0' and b78_11var.get()==1:
        b78_11.invoke()
    if c78_11=='1' and b78_11var.get()==0:
        b78_11.invoke()
    if c78_12=='0' and b78_12var.get()==1:
        b78_12.invoke()
    if c78_12=='1' and b78_12var.get()==0:
        b78_12.invoke()
    if c78_13=='0' and b78_13var.get()==1:
        b78_13.invoke()
    if c78_13=='1' and b78_13var.get()==0:
        b78_13.invoke()
    if c78_14=='0' and b78_14var.get()==1:
        b78_14.invoke()
    if c78_14=='1' and b78_14var.get()==0:
        b78_14.invoke()
    if c78_15=='0' and b78_15var.get()==1:
        b78_15.invoke()
    if c78_15=='1' and b78_15var.get()==0:
        b78_15.invoke()
    if c78_17=='0' and b78_17var.get()==1:
        b78_17.invoke()
    if c78_17=='1' and b78_17var.get()==0:
        b78_17.invoke()
    if tr_79=='1' and trig_79var.get()==0:
        trig_79.invoke()
       
    if c79_0=='0' and b79_0var.get()==1:
        b79_0.invoke()
    if c79_0=='1' and b79_0var.get()==0:
        b79_0.invoke()
    if c79_1=='0' and b79_1var.get()==1:
        b79_1.invoke()
    if c79_1=='1' and b79_1var.get()==0:
        b79_1.invoke()
    if c79_2=='0' and b79_2var.get()==1:
        b79_2.invoke()
    if c79_2=='1' and b79_2var.get()==0:
        b79_2.invoke()
    if c79_3=='0' and b79_3var.get()==1:
        b79_3.invoke()
    if c79_3=='1' and b79_3var.get()==0:
        b79_3.invoke()
    if c79_4=='0' and b79_4var.get()==1:
        b79_4.invoke()
    if c79_4=='1' and b79_4var.get()==0:
        b79_4.invoke()
    if c79_5=='0' and b79_5var.get()==1:
        b79_5.invoke()
    if c79_5=='1' and b79_5var.get()==0:
        b79_5.invoke()
    if c79_6=='0' and b79_6var.get()==1:
        b79_6.invoke()
    if c79_6=='1' and b79_6var.get()==0:
        b79_6.invoke()
    if c79_7=='0' and b79_7var.get()==1:
        b79_7.invoke()
    if c79_7=='1' and b79_7var.get()==0:
        b79_7.invoke()
    if c79_8=='0' and b79_8var.get()==1:
        b79_8.invoke()
    if c79_8=='1' and b79_8var.get()==0:
        b79_8.invoke()
    if c79_9=='0' and b79_9var.get()==1:
        b79_9invoke()
    if c79_9=='1' and b79_9var.get()==0:
        b79_9.invoke()
    if c79_10=='0' and b79_10var.get()==1:
        b79_10.invoke()
    if c79_10=='1' and b79_10var.get()==0:
        b79_10.invoke()
    if c79_11=='0' and b79_11var.get()==1:
        b79_11.invoke()
    if c79_11=='1' and b79_11var.get()==0:
        b79_11.invoke()
    if c79_12=='0' and b79_12var.get()==1:
        b79_12.invoke()
    if c79_12=='1' and b79_12var.get()==0:
        b79_12.invoke()
    if c79_13=='0' and b79_13var.get()==1:
        b79_13.invoke()
    if c79_13=='1' and b79_13var.get()==0:
        b79_13.invoke()
    if c79_14=='0' and b79_14var.get()==1:
        b79_14.invoke()
    if c79_14=='1' and b79_14var.get()==0:
        b79_14.invoke()
    if c79_15=='0' and b79_15var.get()==1:
        b79_15.invoke()
    if c79_15=='1' and b79_15var.get()==0:
        b79_15.invoke()
    if c79_17=='0' and b79_17var.get()==1:
        b79_17.invoke()
    if c79_17=='1' and b79_17var.get()==0:
        b79_17.invoke()
    if tr_80=='1' and trig_80var.get()==0:
        trig_80.invoke()
       
    if c80_0=='0' and b80_0var.get()==1:
        b80_0.invoke()
    if c80_0=='1' and b80_0var.get()==0:
        b80_0.invoke()
    if c80_1=='0' and b80_1var.get()==1:
        b80_1.invoke()
    if c80_1=='1' and b80_1var.get()==0:
        b80_1.invoke()
    if c80_2=='0' and b80_2var.get()==1:
        b80_2.invoke()
    if c80_2=='1' and b80_2var.get()==0:
        b80_2.invoke()
    if c80_3=='0' and b80_3var.get()==1:
        b80_3.invoke()
    if c80_3=='1' and b80_3var.get()==0:
        b80_3.invoke()
    if c80_4=='0' and b80_4var.get()==1:
        b80_4.invoke()
    if c80_4=='1' and b80_4var.get()==0:
        b80_4.invoke()
    if c80_5=='0' and b80_5var.get()==1:
        b80_5.invoke()
    if c80_5=='1' and b80_5var.get()==0:
        b80_5.invoke()
    if c80_6=='0' and b80_6var.get()==1:
        b80_6.invoke()
    if c80_6=='1' and b80_6var.get()==0:
        b80_6.invoke()
    if c80_7=='0' and b80_7var.get()==1:
        b80_7.invoke()
    if c80_7=='1' and b80_7var.get()==0:
        b80_7.invoke()
    if c80_8=='0' and b80_8var.get()==1:
        b80_8.invoke()
    if c80_8=='1' and b80_8var.get()==0:
        b80_8.invoke()
    if c80_9=='0' and b80_9var.get()==1:
        b80_9invoke()
    if c80_9=='1' and b80_9var.get()==0:
        b80_9.invoke()
    if c80_10=='0' and b80_10var.get()==1:
        b80_10.invoke()
    if c80_10=='1' and b80_10var.get()==0:
        b80_10.invoke()
    if c80_11=='0' and b80_11var.get()==1:
        b80_11.invoke()
    if c80_11=='1' and b80_11var.get()==0:
        b80_11.invoke()
    if c80_12=='0' and b80_12var.get()==1:
        b80_12.invoke()
    if c80_12=='1' and b80_12var.get()==0:
        b80_12.invoke()
    if c80_13=='0' and b80_13var.get()==1:
        b80_13.invoke()
    if c80_13=='1' and b80_13var.get()==0:
        b80_13.invoke()
    if c80_14=='0' and b80_14var.get()==1:
        b80_14.invoke()
    if c80_14=='1' and b80_14var.get()==0:
        b80_14.invoke()
    if c80_15=='0' and b80_15var.get()==1:
        b80_15.invoke()
    if c80_15=='1' and b80_15var.get()==0:
        b80_15.invoke()
    if c80_17=='0' and b80_17var.get()==1:
        b80_17.invoke()
    if c80_17=='1' and b80_17var.get()==0:
        b80_17.invoke()
    if tr_81=='1' and trig_81var.get()==0:
        trig_81.invoke()
       
    if c81_0=='0' and b81_0var.get()==1:
        b81_0.invoke()
    if c81_0=='1' and b81_0var.get()==0:
        b81_0.invoke()
    if c81_1=='0' and b81_1var.get()==1:
        b81_1.invoke()
    if c81_1=='1' and b81_1var.get()==0:
        b81_1.invoke()
    if c81_2=='0' and b81_2var.get()==1:
        b81_2.invoke()
    if c81_2=='1' and b81_2var.get()==0:
        b81_2.invoke()
    if c81_3=='0' and b81_3var.get()==1:
        b81_3.invoke()
    if c81_3=='1' and b81_3var.get()==0:
        b81_3.invoke()
    if c81_4=='0' and b81_4var.get()==1:
        b81_4.invoke()
    if c81_4=='1' and b81_4var.get()==0:
        b81_4.invoke()
    if c81_5=='0' and b81_5var.get()==1:
        b81_5.invoke()
    if c81_5=='1' and b81_5var.get()==0:
        b81_5.invoke()
    if c81_6=='0' and b81_6var.get()==1:
        b81_6.invoke()
    if c81_6=='1' and b81_6var.get()==0:
        b81_6.invoke()
    if c81_7=='0' and b81_7var.get()==1:
        b81_7.invoke()
    if c81_7=='1' and b81_7var.get()==0:
        b81_7.invoke()
    if c81_8=='0' and b81_8var.get()==1:
        b81_8.invoke()
    if c81_8=='1' and b81_8var.get()==0:
        b81_8.invoke()
    if c81_9=='0' and b81_9var.get()==1:
        b81_9invoke()
    if c81_9=='1' and b81_9var.get()==0:
        b81_9.invoke()
    if c81_10=='0' and b81_10var.get()==1:
        b81_10.invoke()
    if c81_10=='1' and b81_10var.get()==0:
        b81_10.invoke()
    if c81_11=='0' and b81_11var.get()==1:
        b81_11.invoke()
    if c81_11=='1' and b81_11var.get()==0:
        b81_11.invoke()
    if c81_12=='0' and b81_12var.get()==1:
        b81_12.invoke()
    if c81_12=='1' and b81_12var.get()==0:
        b81_12.invoke()
    if c81_13=='0' and b81_13var.get()==1:
        b81_13.invoke()
    if c81_13=='1' and b81_13var.get()==0:
        b81_13.invoke()
    if c81_14=='0' and b81_14var.get()==1:
        b81_14.invoke()
    if c81_14=='1' and b81_14var.get()==0:
        b81_14.invoke()
    if c81_15=='0' and b81_15var.get()==1:
        b81_15.invoke()
    if c81_15=='1' and b81_15var.get()==0:
        b81_15.invoke()
    if c81_17=='0' and b81_17var.get()==1:
        b81_17.invoke()
    if c81_17=='1' and b81_17var.get()==0:
        b81_17.invoke()
    if tr_82=='1' and trig_82var.get()==0:
        trig_82.invoke()
       
    if c82_0=='0' and b82_0var.get()==1:
        b82_0.invoke()
    if c82_0=='1' and b82_0var.get()==0:
        b82_0.invoke()
    if c82_1=='0' and b82_1var.get()==1:
        b82_1.invoke()
    if c82_1=='1' and b82_1var.get()==0:
        b82_1.invoke()
    if c82_2=='0' and b82_2var.get()==1:
        b82_2.invoke()
    if c82_2=='1' and b82_2var.get()==0:
        b82_2.invoke()
    if c82_3=='0' and b82_3var.get()==1:
        b82_3.invoke()
    if c82_3=='1' and b82_3var.get()==0:
        b82_3.invoke()
    if c82_4=='0' and b82_4var.get()==1:
        b82_4.invoke()
    if c82_4=='1' and b82_4var.get()==0:
        b82_4.invoke()
    if c82_5=='0' and b82_5var.get()==1:
        b82_5.invoke()
    if c82_5=='1' and b82_5var.get()==0:
        b82_5.invoke()
    if c82_6=='0' and b82_6var.get()==1:
        b82_6.invoke()
    if c82_6=='1' and b82_6var.get()==0:
        b82_6.invoke()
    if c82_7=='0' and b82_7var.get()==1:
        b82_7.invoke()
    if c82_7=='1' and b82_7var.get()==0:
        b82_7.invoke()
    if c82_8=='0' and b82_8var.get()==1:
        b82_8.invoke()
    if c82_8=='1' and b82_8var.get()==0:
        b82_8.invoke()
    if c82_9=='0' and b82_9var.get()==1:
        b82_9invoke()
    if c82_9=='1' and b82_9var.get()==0:
        b82_9.invoke()
    if c82_10=='0' and b82_10var.get()==1:
        b82_10.invoke()
    if c82_10=='1' and b82_10var.get()==0:
        b82_10.invoke()
    if c82_11=='0' and b82_11var.get()==1:
        b82_11.invoke()
    if c82_11=='1' and b82_11var.get()==0:
        b82_11.invoke()
    if c82_12=='0' and b82_12var.get()==1:
        b82_12.invoke()
    if c82_12=='1' and b82_12var.get()==0:
        b82_12.invoke()
    if c82_13=='0' and b82_13var.get()==1:
        b82_13.invoke()
    if c82_13=='1' and b82_13var.get()==0:
        b82_13.invoke()
    if c82_14=='0' and b82_14var.get()==1:
        b82_14.invoke()
    if c82_14=='1' and b82_14var.get()==0:
        b82_14.invoke()
    if c82_15=='0' and b82_15var.get()==1:
        b82_15.invoke()
    if c82_15=='1' and b82_15var.get()==0:
        b82_15.invoke()
    if c82_17=='0' and b82_17var.get()==1:
        b82_17.invoke()
    if c82_17=='1' and b82_17var.get()==0:
        b82_17.invoke()
    if tr_83=='1' and trig_83var.get()==0:
        trig_83.invoke()
       
    if c83_0=='0' and b83_0var.get()==1:
        b83_0.invoke()
    if c83_0=='1' and b83_0var.get()==0:
        b83_0.invoke()
    if c83_1=='0' and b83_1var.get()==1:
        b83_1.invoke()
    if c83_1=='1' and b83_1var.get()==0:
        b83_1.invoke()
    if c83_2=='0' and b83_2var.get()==1:
        b83_2.invoke()
    if c83_2=='1' and b83_2var.get()==0:
        b83_2.invoke()
    if c83_3=='0' and b83_3var.get()==1:
        b83_3.invoke()
    if c83_3=='1' and b83_3var.get()==0:
        b83_3.invoke()
    if c83_4=='0' and b83_4var.get()==1:
        b83_4.invoke()
    if c83_4=='1' and b83_4var.get()==0:
        b83_4.invoke()
    if c83_5=='0' and b83_5var.get()==1:
        b83_5.invoke()
    if c83_5=='1' and b83_5var.get()==0:
        b83_5.invoke()
    if c83_6=='0' and b83_6var.get()==1:
        b83_6.invoke()
    if c83_6=='1' and b83_6var.get()==0:
        b83_6.invoke()
    if c83_7=='0' and b83_7var.get()==1:
        b83_7.invoke()
    if c83_7=='1' and b83_7var.get()==0:
        b83_7.invoke()
    if c83_8=='0' and b83_8var.get()==1:
        b83_8.invoke()
    if c83_8=='1' and b83_8var.get()==0:
        b83_8.invoke()
    if c83_9=='0' and b83_9var.get()==1:
        b83_9invoke()
    if c83_9=='1' and b83_9var.get()==0:
        b83_9.invoke()
    if c83_10=='0' and b83_10var.get()==1:
        b83_10.invoke()
    if c83_10=='1' and b83_10var.get()==0:
        b83_10.invoke()
    if c83_11=='0' and b83_11var.get()==1:
        b83_11.invoke()
    if c83_11=='1' and b83_11var.get()==0:
        b83_11.invoke()
    if c83_12=='0' and b83_12var.get()==1:
        b83_12.invoke()
    if c83_12=='1' and b83_12var.get()==0:
        b83_12.invoke()
    if c83_13=='0' and b83_13var.get()==1:
        b83_13.invoke()
    if c83_13=='1' and b83_13var.get()==0:
        b83_13.invoke()
    if c83_14=='0' and b83_14var.get()==1:
        b83_14.invoke()
    if c83_14=='1' and b83_14var.get()==0:
        b83_14.invoke()
    if c83_15=='0' and b83_15var.get()==1:
        b83_15.invoke()
    if c83_15=='1' and b83_15var.get()==0:
        b83_15.invoke()
    if c83_17=='0' and b83_17var.get()==1:
        b83_17.invoke()
    if c83_17=='1' and b83_17var.get()==0:
        b83_17.invoke()
    if tr_84=='1' and trig_84var.get()==0:
        trig_84.invoke()
       
    if c84_0=='0' and b84_0var.get()==1:
        b84_0.invoke()
    if c84_0=='1' and b84_0var.get()==0:
        b84_0.invoke()
    if c84_1=='0' and b84_1var.get()==1:
        b84_1.invoke()
    if c84_1=='1' and b84_1var.get()==0:
        b84_1.invoke()
    if c84_2=='0' and b84_2var.get()==1:
        b84_2.invoke()
    if c84_2=='1' and b84_2var.get()==0:
        b84_2.invoke()
    if c84_3=='0' and b84_3var.get()==1:
        b84_3.invoke()
    if c84_3=='1' and b84_3var.get()==0:
        b84_3.invoke()
    if c84_4=='0' and b84_4var.get()==1:
        b84_4.invoke()
    if c84_4=='1' and b84_4var.get()==0:
        b84_4.invoke()
    if c84_5=='0' and b84_5var.get()==1:
        b84_5.invoke()
    if c84_5=='1' and b84_5var.get()==0:
        b84_5.invoke()
    if c84_6=='0' and b84_6var.get()==1:
        b84_6.invoke()
    if c84_6=='1' and b84_6var.get()==0:
        b84_6.invoke()
    if c84_7=='0' and b84_7var.get()==1:
        b84_7.invoke()
    if c84_7=='1' and b84_7var.get()==0:
        b84_7.invoke()
    if c84_8=='0' and b84_8var.get()==1:
        b84_8.invoke()
    if c84_8=='1' and b84_8var.get()==0:
        b84_8.invoke()
    if c84_9=='0' and b84_9var.get()==1:
        b84_9invoke()
    if c84_9=='1' and b84_9var.get()==0:
        b84_9.invoke()
    if c84_10=='0' and b84_10var.get()==1:
        b84_10.invoke()
    if c84_10=='1' and b84_10var.get()==0:
        b84_10.invoke()
    if c84_11=='0' and b84_11var.get()==1:
        b84_11.invoke()
    if c84_11=='1' and b84_11var.get()==0:
        b84_11.invoke()
    if c84_12=='0' and b84_12var.get()==1:
        b84_12.invoke()
    if c84_12=='1' and b84_12var.get()==0:
        b84_12.invoke()
    if c84_13=='0' and b84_13var.get()==1:
        b84_13.invoke()
    if c84_13=='1' and b84_13var.get()==0:
        b84_13.invoke()
    if c84_14=='0' and b84_14var.get()==1:
        b84_14.invoke()
    if c84_14=='1' and b84_14var.get()==0:
        b84_14.invoke()
    if c84_15=='0' and b84_15var.get()==1:
        b84_15.invoke()
    if c84_15=='1' and b84_15var.get()==0:
        b84_15.invoke()
    if c84_17=='0' and b84_17var.get()==1:
        b84_17.invoke()
    if c84_17=='1' and b84_17var.get()==0:
        b84_17.invoke()
    if tr_85=='1' and trig_85var.get()==0:
        trig_85.invoke()
       
    if c85_0=='0' and b85_0var.get()==1:
        b85_0.invoke()
    if c85_0=='1' and b85_0var.get()==0:
        b85_0.invoke()
    if c85_1=='0' and b85_1var.get()==1:
        b85_1.invoke()
    if c85_1=='1' and b85_1var.get()==0:
        b85_1.invoke()
    if c85_2=='0' and b85_2var.get()==1:
        b85_2.invoke()
    if c85_2=='1' and b85_2var.get()==0:
        b85_2.invoke()
    if c85_3=='0' and b85_3var.get()==1:
        b85_3.invoke()
    if c85_3=='1' and b85_3var.get()==0:
        b85_3.invoke()
    if c85_4=='0' and b85_4var.get()==1:
        b85_4.invoke()
    if c85_4=='1' and b85_4var.get()==0:
        b85_4.invoke()
    if c85_5=='0' and b85_5var.get()==1:
        b85_5.invoke()
    if c85_5=='1' and b85_5var.get()==0:
        b85_5.invoke()
    if c85_6=='0' and b85_6var.get()==1:
        b85_6.invoke()
    if c85_6=='1' and b85_6var.get()==0:
        b85_6.invoke()
    if c85_7=='0' and b85_7var.get()==1:
        b85_7.invoke()
    if c85_7=='1' and b85_7var.get()==0:
        b85_7.invoke()
    if c85_8=='0' and b85_8var.get()==1:
        b85_8.invoke()
    if c85_8=='1' and b85_8var.get()==0:
        b85_8.invoke()
    if c85_9=='0' and b85_9var.get()==1:
        b85_9invoke()
    if c85_9=='1' and b85_9var.get()==0:
        b85_9.invoke()
    if c85_10=='0' and b85_10var.get()==1:
        b85_10.invoke()
    if c85_10=='1' and b85_10var.get()==0:
        b85_10.invoke()
    if c85_11=='0' and b85_11var.get()==1:
        b85_11.invoke()
    if c85_11=='1' and b85_11var.get()==0:
        b85_11.invoke()
    if c85_12=='0' and b85_12var.get()==1:
        b85_12.invoke()
    if c85_12=='1' and b85_12var.get()==0:
        b85_12.invoke()
    if c85_13=='0' and b85_13var.get()==1:
        b85_13.invoke()
    if c85_13=='1' and b85_13var.get()==0:
        b85_13.invoke()
    if c85_14=='0' and b85_14var.get()==1:
        b85_14.invoke()
    if c85_14=='1' and b85_14var.get()==0:
        b85_14.invoke()
    if c85_15=='0' and b85_15var.get()==1:
        b85_15.invoke()
    if c85_15=='1' and b85_15var.get()==0:
        b85_15.invoke()
    if c85_17=='0' and b85_17var.get()==1:
        b85_17.invoke()
    if c85_17=='1' and b85_17var.get()==0:
        b85_17.invoke()
    if tr_86=='1' and trig_86var.get()==0:
        trig_86.invoke()
       
    if c86_0=='0' and b86_0var.get()==1:
        b86_0.invoke()
    if c86_0=='1' and b86_0var.get()==0:
        b86_0.invoke()
    if c86_1=='0' and b86_1var.get()==1:
        b86_1.invoke()
    if c86_1=='1' and b86_1var.get()==0:
        b86_1.invoke()
    if c86_2=='0' and b86_2var.get()==1:
        b86_2.invoke()
    if c86_2=='1' and b86_2var.get()==0:
        b86_2.invoke()
    if c86_3=='0' and b86_3var.get()==1:
        b86_3.invoke()
    if c86_3=='1' and b86_3var.get()==0:
        b86_3.invoke()
    if c86_4=='0' and b86_4var.get()==1:
        b86_4.invoke()
    if c86_4=='1' and b86_4var.get()==0:
        b86_4.invoke()
    if c86_5=='0' and b86_5var.get()==1:
        b86_5.invoke()
    if c86_5=='1' and b86_5var.get()==0:
        b86_5.invoke()
    if c86_6=='0' and b86_6var.get()==1:
        b86_6.invoke()
    if c86_6=='1' and b86_6var.get()==0:
        b86_6.invoke()
    if c86_7=='0' and b86_7var.get()==1:
        b86_7.invoke()
    if c86_7=='1' and b86_7var.get()==0:
        b86_7.invoke()
    if c86_8=='0' and b86_8var.get()==1:
        b86_8.invoke()
    if c86_8=='1' and b86_8var.get()==0:
        b86_8.invoke()
    if c86_9=='0' and b86_9var.get()==1:
        b86_9invoke()
    if c86_9=='1' and b86_9var.get()==0:
        b86_9.invoke()
    if c86_10=='0' and b86_10var.get()==1:
        b86_10.invoke()
    if c86_10=='1' and b86_10var.get()==0:
        b86_10.invoke()
    if c86_11=='0' and b86_11var.get()==1:
        b86_11.invoke()
    if c86_11=='1' and b86_11var.get()==0:
        b86_11.invoke()
    if c86_12=='0' and b86_12var.get()==1:
        b86_12.invoke()
    if c86_12=='1' and b86_12var.get()==0:
        b86_12.invoke()
    if c86_13=='0' and b86_13var.get()==1:
        b86_13.invoke()
    if c86_13=='1' and b86_13var.get()==0:
        b86_13.invoke()
    if c86_14=='0' and b86_14var.get()==1:
        b86_14.invoke()
    if c86_14=='1' and b86_14var.get()==0:
        b86_14.invoke()
    if c86_15=='0' and b86_15var.get()==1:
        b86_15.invoke()
    if c86_15=='1' and b86_15var.get()==0:
        b86_15.invoke()
    if c86_17=='0' and b86_17var.get()==1:
        b86_17.invoke()
    if c86_17=='1' and b86_17var.get()==0:
        b86_17.invoke()
    if tr_87=='1' and trig_87var.get()==0:
        trig_87.invoke()
       
    if c87_0=='0' and b87_0var.get()==1:
        b87_0.invoke()
    if c87_0=='1' and b87_0var.get()==0:
        b87_0.invoke()
    if c87_1=='0' and b87_1var.get()==1:
        b87_1.invoke()
    if c87_1=='1' and b87_1var.get()==0:
        b87_1.invoke()
    if c87_2=='0' and b87_2var.get()==1:
        b87_2.invoke()
    if c87_2=='1' and b87_2var.get()==0:
        b87_2.invoke()
    if c87_3=='0' and b87_3var.get()==1:
        b87_3.invoke()
    if c87_3=='1' and b87_3var.get()==0:
        b87_3.invoke()
    if c87_4=='0' and b87_4var.get()==1:
        b87_4.invoke()
    if c87_4=='1' and b87_4var.get()==0:
        b87_4.invoke()
    if c87_5=='0' and b87_5var.get()==1:
        b87_5.invoke()
    if c87_5=='1' and b87_5var.get()==0:
        b87_5.invoke()
    if c87_6=='0' and b87_6var.get()==1:
        b87_6.invoke()
    if c87_6=='1' and b87_6var.get()==0:
        b87_6.invoke()
    if c87_7=='0' and b87_7var.get()==1:
        b87_7.invoke()
    if c87_7=='1' and b87_7var.get()==0:
        b87_7.invoke()
    if c87_8=='0' and b87_8var.get()==1:
        b87_8.invoke()
    if c87_8=='1' and b87_8var.get()==0:
        b87_8.invoke()
    if c87_9=='0' and b87_9var.get()==1:
        b87_9invoke()
    if c87_9=='1' and b87_9var.get()==0:
        b87_9.invoke()
    if c87_10=='0' and b87_10var.get()==1:
        b87_10.invoke()
    if c87_10=='1' and b87_10var.get()==0:
        b87_10.invoke()
    if c87_11=='0' and b87_11var.get()==1:
        b87_11.invoke()
    if c87_11=='1' and b87_11var.get()==0:
        b87_11.invoke()
    if c87_12=='0' and b87_12var.get()==1:
        b87_12.invoke()
    if c87_12=='1' and b87_12var.get()==0:
        b87_12.invoke()
    if c87_13=='0' and b87_13var.get()==1:
        b87_13.invoke()
    if c87_13=='1' and b87_13var.get()==0:
        b87_13.invoke()
    if c87_14=='0' and b87_14var.get()==1:
        b87_14.invoke()
    if c87_14=='1' and b87_14var.get()==0:
        b87_14.invoke()
    if c87_15=='0' and b87_15var.get()==1:
        b87_15.invoke()
    if c87_15=='1' and b87_15var.get()==0:
        b87_15.invoke()
    if c87_17=='0' and b87_17var.get()==1:
        b87_17.invoke()
    if c87_17=='1' and b87_17var.get()==0:
        b87_17.invoke()
    if tr_88=='1' and trig_88var.get()==0:
        trig_88.invoke()
       
    if c88_0=='0' and b88_0var.get()==1:
        b88_0.invoke()
    if c88_0=='1' and b88_0var.get()==0:
        b88_0.invoke()
    if c88_1=='0' and b88_1var.get()==1:
        b88_1.invoke()
    if c88_1=='1' and b88_1var.get()==0:
        b88_1.invoke()
    if c88_2=='0' and b88_2var.get()==1:
        b88_2.invoke()
    if c88_2=='1' and b88_2var.get()==0:
        b88_2.invoke()
    if c88_3=='0' and b88_3var.get()==1:
        b88_3.invoke()
    if c88_3=='1' and b88_3var.get()==0:
        b88_3.invoke()
    if c88_4=='0' and b88_4var.get()==1:
        b88_4.invoke()
    if c88_4=='1' and b88_4var.get()==0:
        b88_4.invoke()
    if c88_5=='0' and b88_5var.get()==1:
        b88_5.invoke()
    if c88_5=='1' and b88_5var.get()==0:
        b88_5.invoke()
    if c88_6=='0' and b88_6var.get()==1:
        b88_6.invoke()
    if c88_6=='1' and b88_6var.get()==0:
        b88_6.invoke()
    if c88_7=='0' and b88_7var.get()==1:
        b88_7.invoke()
    if c88_7=='1' and b88_7var.get()==0:
        b88_7.invoke()
    if c88_8=='0' and b88_8var.get()==1:
        b88_8.invoke()
    if c88_8=='1' and b88_8var.get()==0:
        b88_8.invoke()
    if c88_9=='0' and b88_9var.get()==1:
        b88_9invoke()
    if c88_9=='1' and b88_9var.get()==0:
        b88_9.invoke()
    if c88_10=='0' and b88_10var.get()==1:
        b88_10.invoke()
    if c88_10=='1' and b88_10var.get()==0:
        b88_10.invoke()
    if c88_11=='0' and b88_11var.get()==1:
        b88_11.invoke()
    if c88_11=='1' and b88_11var.get()==0:
        b88_11.invoke()
    if c88_12=='0' and b88_12var.get()==1:
        b88_12.invoke()
    if c88_12=='1' and b88_12var.get()==0:
        b88_12.invoke()
    if c88_13=='0' and b88_13var.get()==1:
        b88_13.invoke()
    if c88_13=='1' and b88_13var.get()==0:
        b88_13.invoke()
    if c88_14=='0' and b88_14var.get()==1:
        b88_14.invoke()
    if c88_14=='1' and b88_14var.get()==0:
        b88_14.invoke()
    if c88_15=='0' and b88_15var.get()==1:
        b88_15.invoke()
    if c88_15=='1' and b88_15var.get()==0:
        b88_15.invoke()
    if c88_17=='0' and b88_17var.get()==1:
        b88_17.invoke()
    if c88_17=='1' and b88_17var.get()==0:
        b88_17.invoke()
    if tr_89=='1' and trig_89var.get()==0:
        trig_89.invoke()
       
    if c89_0=='0' and b89_0var.get()==1:
        b89_0.invoke()
    if c89_0=='1' and b89_0var.get()==0:
        b89_0.invoke()
    if c89_1=='0' and b89_1var.get()==1:
        b89_1.invoke()
    if c89_1=='1' and b89_1var.get()==0:
        b89_1.invoke()
    if c89_2=='0' and b89_2var.get()==1:
        b89_2.invoke()
    if c89_2=='1' and b89_2var.get()==0:
        b89_2.invoke()
    if c89_3=='0' and b89_3var.get()==1:
        b89_3.invoke()
    if c89_3=='1' and b89_3var.get()==0:
        b89_3.invoke()
    if c89_4=='0' and b89_4var.get()==1:
        b89_4.invoke()
    if c89_4=='1' and b89_4var.get()==0:
        b89_4.invoke()
    if c89_5=='0' and b89_5var.get()==1:
        b89_5.invoke()
    if c89_5=='1' and b89_5var.get()==0:
        b89_5.invoke()
    if c89_6=='0' and b89_6var.get()==1:
        b89_6.invoke()
    if c89_6=='1' and b89_6var.get()==0:
        b89_6.invoke()
    if c89_7=='0' and b89_7var.get()==1:
        b89_7.invoke()
    if c89_7=='1' and b89_7var.get()==0:
        b89_7.invoke()
    if c89_8=='0' and b89_8var.get()==1:
        b89_8.invoke()
    if c89_8=='1' and b89_8var.get()==0:
        b89_8.invoke()
    if c89_9=='0' and b89_9var.get()==1:
        b89_9invoke()
    if c89_9=='1' and b89_9var.get()==0:
        b89_9.invoke()
    if c89_10=='0' and b89_10var.get()==1:
        b89_10.invoke()
    if c89_10=='1' and b89_10var.get()==0:
        b89_10.invoke()
    if c89_11=='0' and b89_11var.get()==1:
        b89_11.invoke()
    if c89_11=='1' and b89_11var.get()==0:
        b89_11.invoke()
    if c89_12=='0' and b89_12var.get()==1:
        b89_12.invoke()
    if c89_12=='1' and b89_12var.get()==0:
        b89_12.invoke()
    if c89_13=='0' and b89_13var.get()==1:
        b89_13.invoke()
    if c89_13=='1' and b89_13var.get()==0:
        b89_13.invoke()
    if c89_14=='0' and b89_14var.get()==1:
        b89_14.invoke()
    if c89_14=='1' and b89_14var.get()==0:
        b89_14.invoke()
    if c89_15=='0' and b89_15var.get()==1:
        b89_15.invoke()
    if c89_15=='1' and b89_15var.get()==0:
        b89_15.invoke()
    if c89_17=='0' and b89_17var.get()==1:
        b89_17.invoke()
    if c89_17=='1' and b89_17var.get()==0:
        b89_17.invoke()
    if tr_90=='1' and trig_90var.get()==0:
        trig_90.invoke()
       
    if c90_0=='0' and b90_0var.get()==1:
        b90_0.invoke()
    if c90_0=='1' and b90_0var.get()==0:
        b90_0.invoke()
    if c90_1=='0' and b90_1var.get()==1:
        b90_1.invoke()
    if c90_1=='1' and b90_1var.get()==0:
        b90_1.invoke()
    if c90_2=='0' and b90_2var.get()==1:
        b90_2.invoke()
    if c90_2=='1' and b90_2var.get()==0:
        b90_2.invoke()
    if c90_3=='0' and b90_3var.get()==1:
        b90_3.invoke()
    if c90_3=='1' and b90_3var.get()==0:
        b90_3.invoke()
    if c90_4=='0' and b90_4var.get()==1:
        b90_4.invoke()
    if c90_4=='1' and b90_4var.get()==0:
        b90_4.invoke()
    if c90_5=='0' and b90_5var.get()==1:
        b90_5.invoke()
    if c90_5=='1' and b90_5var.get()==0:
        b90_5.invoke()
    if c90_6=='0' and b90_6var.get()==1:
        b90_6.invoke()
    if c90_6=='1' and b90_6var.get()==0:
        b90_6.invoke()
    if c90_7=='0' and b90_7var.get()==1:
        b90_7.invoke()
    if c90_7=='1' and b90_7var.get()==0:
        b90_7.invoke()
    if c90_8=='0' and b90_8var.get()==1:
        b90_8.invoke()
    if c90_8=='1' and b90_8var.get()==0:
        b90_8.invoke()
    if c90_9=='0' and b90_9var.get()==1:
        b90_9invoke()
    if c90_9=='1' and b90_9var.get()==0:
        b90_9.invoke()
    if c90_10=='0' and b90_10var.get()==1:
        b90_10.invoke()
    if c90_10=='1' and b90_10var.get()==0:
        b90_10.invoke()
    if c90_11=='0' and b90_11var.get()==1:
        b90_11.invoke()
    if c90_11=='1' and b90_11var.get()==0:
        b90_11.invoke()
    if c90_12=='0' and b90_12var.get()==1:
        b90_12.invoke()
    if c90_12=='1' and b90_12var.get()==0:
        b90_12.invoke()
    if c90_13=='0' and b90_13var.get()==1:
        b90_13.invoke()
    if c90_13=='1' and b90_13var.get()==0:
        b90_13.invoke()
    if c90_14=='0' and b90_14var.get()==1:
        b90_14.invoke()
    if c90_14=='1' and b90_14var.get()==0:
        b90_14.invoke()
    if c90_15=='0' and b90_15var.get()==1:
        b90_15.invoke()
    if c90_15=='1' and b90_15var.get()==0:
        b90_15.invoke()
    if c90_17=='0' and b90_17var.get()==1:
        b90_17.invoke()
    if c90_17=='1' and b90_17var.get()==0:
        b90_17.invoke()
    if tr_91=='1' and trig_91var.get()==0:
        trig_91.invoke()
       
    if c91_0=='0' and b91_0var.get()==1:
        b91_0.invoke()
    if c91_0=='1' and b91_0var.get()==0:
        b91_0.invoke()
    if c91_1=='0' and b91_1var.get()==1:
        b91_1.invoke()
    if c91_1=='1' and b91_1var.get()==0:
        b91_1.invoke()
    if c91_2=='0' and b91_2var.get()==1:
        b91_2.invoke()
    if c91_2=='1' and b91_2var.get()==0:
        b91_2.invoke()
    if c91_3=='0' and b91_3var.get()==1:
        b91_3.invoke()
    if c91_3=='1' and b91_3var.get()==0:
        b91_3.invoke()
    if c91_4=='0' and b91_4var.get()==1:
        b91_4.invoke()
    if c91_4=='1' and b91_4var.get()==0:
        b91_4.invoke()
    if c91_5=='0' and b91_5var.get()==1:
        b91_5.invoke()
    if c91_5=='1' and b91_5var.get()==0:
        b91_5.invoke()
    if c91_6=='0' and b91_6var.get()==1:
        b91_6.invoke()
    if c91_6=='1' and b91_6var.get()==0:
        b91_6.invoke()
    if c91_7=='0' and b91_7var.get()==1:
        b91_7.invoke()
    if c91_7=='1' and b91_7var.get()==0:
        b91_7.invoke()
    if c91_8=='0' and b91_8var.get()==1:
        b91_8.invoke()
    if c91_8=='1' and b91_8var.get()==0:
        b91_8.invoke()
    if c91_9=='0' and b91_9var.get()==1:
        b91_9invoke()
    if c91_9=='1' and b91_9var.get()==0:
        b91_9.invoke()
    if c91_10=='0' and b91_10var.get()==1:
        b91_10.invoke()
    if c91_10=='1' and b91_10var.get()==0:
        b91_10.invoke()
    if c91_11=='0' and b91_11var.get()==1:
        b91_11.invoke()
    if c91_11=='1' and b91_11var.get()==0:
        b91_11.invoke()
    if c91_12=='0' and b91_12var.get()==1:
        b91_12.invoke()
    if c91_12=='1' and b91_12var.get()==0:
        b91_12.invoke()
    if c91_13=='0' and b91_13var.get()==1:
        b91_13.invoke()
    if c91_13=='1' and b91_13var.get()==0:
        b91_13.invoke()
    if c91_14=='0' and b91_14var.get()==1:
        b91_14.invoke()
    if c91_14=='1' and b91_14var.get()==0:
        b91_14.invoke()
    if c91_15=='0' and b91_15var.get()==1:
        b91_15.invoke()
    if c91_15=='1' and b91_15var.get()==0:
        b91_15.invoke()
    if c91_17=='0' and b91_17var.get()==1:
        b91_17.invoke()
    if c91_17=='1' and b91_17var.get()==0:
        b91_17.invoke()
    if tr_92=='1' and trig_92var.get()==0:
        trig_92.invoke()
       
    if c92_0=='0' and b92_0var.get()==1:
        b92_0.invoke()
    if c92_0=='1' and b92_0var.get()==0:
        b92_0.invoke()
    if c92_1=='0' and b92_1var.get()==1:
        b92_1.invoke()
    if c92_1=='1' and b92_1var.get()==0:
        b92_1.invoke()
    if c92_2=='0' and b92_2var.get()==1:
        b92_2.invoke()
    if c92_2=='1' and b92_2var.get()==0:
        b92_2.invoke()
    if c92_3=='0' and b92_3var.get()==1:
        b92_3.invoke()
    if c92_3=='1' and b92_3var.get()==0:
        b92_3.invoke()
    if c92_4=='0' and b92_4var.get()==1:
        b92_4.invoke()
    if c92_4=='1' and b92_4var.get()==0:
        b92_4.invoke()
    if c92_5=='0' and b92_5var.get()==1:
        b92_5.invoke()
    if c92_5=='1' and b92_5var.get()==0:
        b92_5.invoke()
    if c92_6=='0' and b92_6var.get()==1:
        b92_6.invoke()
    if c92_6=='1' and b92_6var.get()==0:
        b92_6.invoke()
    if c92_7=='0' and b92_7var.get()==1:
        b92_7.invoke()
    if c92_7=='1' and b92_7var.get()==0:
        b92_7.invoke()
    if c92_8=='0' and b92_8var.get()==1:
        b92_8.invoke()
    if c92_8=='1' and b92_8var.get()==0:
        b92_8.invoke()
    if c92_9=='0' and b92_9var.get()==1:
        b92_9invoke()
    if c92_9=='1' and b92_9var.get()==0:
        b92_9.invoke()
    if c92_10=='0' and b92_10var.get()==1:
        b92_10.invoke()
    if c92_10=='1' and b92_10var.get()==0:
        b92_10.invoke()
    if c92_11=='0' and b92_11var.get()==1:
        b92_11.invoke()
    if c92_11=='1' and b92_11var.get()==0:
        b92_11.invoke()
    if c92_12=='0' and b92_12var.get()==1:
        b92_12.invoke()
    if c92_12=='1' and b92_12var.get()==0:
        b92_12.invoke()
    if c92_13=='0' and b92_13var.get()==1:
        b92_13.invoke()
    if c92_13=='1' and b92_13var.get()==0:
        b92_13.invoke()
    if c92_14=='0' and b92_14var.get()==1:
        b92_14.invoke()
    if c92_14=='1' and b92_14var.get()==0:
        b92_14.invoke()
    if c92_15=='0' and b92_15var.get()==1:
        b92_15.invoke()
    if c92_15=='1' and b92_15var.get()==0:
        b92_15.invoke()
    if c92_17=='0' and b92_17var.get()==1:
        b92_17.invoke()
    if c92_17=='1' and b92_17var.get()==0:
        b92_17.invoke()
    if tr_93=='1' and trig_93var.get()==0:
        trig_93.invoke()
       
    if c93_0=='0' and b93_0var.get()==1:
        b93_0.invoke()
    if c93_0=='1' and b93_0var.get()==0:
        b93_0.invoke()
    if c93_1=='0' and b93_1var.get()==1:
        b93_1.invoke()
    if c93_1=='1' and b93_1var.get()==0:
        b93_1.invoke()
    if c93_2=='0' and b93_2var.get()==1:
        b93_2.invoke()
    if c93_2=='1' and b93_2var.get()==0:
        b93_2.invoke()
    if c93_3=='0' and b93_3var.get()==1:
        b93_3.invoke()
    if c93_3=='1' and b93_3var.get()==0:
        b93_3.invoke()
    if c93_4=='0' and b93_4var.get()==1:
        b93_4.invoke()
    if c93_4=='1' and b93_4var.get()==0:
        b93_4.invoke()
    if c93_5=='0' and b93_5var.get()==1:
        b93_5.invoke()
    if c93_5=='1' and b93_5var.get()==0:
        b93_5.invoke()
    if c93_6=='0' and b93_6var.get()==1:
        b93_6.invoke()
    if c93_6=='1' and b93_6var.get()==0:
        b93_6.invoke()
    if c93_7=='0' and b93_7var.get()==1:
        b93_7.invoke()
    if c93_7=='1' and b93_7var.get()==0:
        b93_7.invoke()
    if c93_8=='0' and b93_8var.get()==1:
        b93_8.invoke()
    if c93_8=='1' and b93_8var.get()==0:
        b93_8.invoke()
    if c93_9=='0' and b93_9var.get()==1:
        b93_9invoke()
    if c93_9=='1' and b93_9var.get()==0:
        b93_9.invoke()
    if c93_10=='0' and b93_10var.get()==1:
        b93_10.invoke()
    if c93_10=='1' and b93_10var.get()==0:
        b93_10.invoke()
    if c93_11=='0' and b93_11var.get()==1:
        b93_11.invoke()
    if c93_11=='1' and b93_11var.get()==0:
        b93_11.invoke()
    if c93_12=='0' and b93_12var.get()==1:
        b93_12.invoke()
    if c93_12=='1' and b93_12var.get()==0:
        b93_12.invoke()
    if c93_13=='0' and b93_13var.get()==1:
        b93_13.invoke()
    if c93_13=='1' and b93_13var.get()==0:
        b93_13.invoke()
    if c93_14=='0' and b93_14var.get()==1:
        b93_14.invoke()
    if c93_14=='1' and b93_14var.get()==0:
        b93_14.invoke()
    if c93_15=='0' and b93_15var.get()==1:
        b93_15.invoke()
    if c93_15=='1' and b93_15var.get()==0:
        b93_15.invoke()
    if c93_17=='0' and b93_17var.get()==1:
        b93_17.invoke()
    if c93_17=='1' and b93_17var.get()==0:
        b93_17.invoke()
    if tr_94=='1' and trig_94var.get()==0:
        trig_94.invoke()
       
    if c94_0=='0' and b94_0var.get()==1:
        b94_0.invoke()
    if c94_0=='1' and b94_0var.get()==0:
        b94_0.invoke()
    if c94_1=='0' and b94_1var.get()==1:
        b94_1.invoke()
    if c94_1=='1' and b94_1var.get()==0:
        b94_1.invoke()
    if c94_2=='0' and b94_2var.get()==1:
        b94_2.invoke()
    if c94_2=='1' and b94_2var.get()==0:
        b94_2.invoke()
    if c94_3=='0' and b94_3var.get()==1:
        b94_3.invoke()
    if c94_3=='1' and b94_3var.get()==0:
        b94_3.invoke()
    if c94_4=='0' and b94_4var.get()==1:
        b94_4.invoke()
    if c94_4=='1' and b94_4var.get()==0:
        b94_4.invoke()
    if c94_5=='0' and b94_5var.get()==1:
        b94_5.invoke()
    if c94_5=='1' and b94_5var.get()==0:
        b94_5.invoke()
    if c94_6=='0' and b94_6var.get()==1:
        b94_6.invoke()
    if c94_6=='1' and b94_6var.get()==0:
        b94_6.invoke()
    if c94_7=='0' and b94_7var.get()==1:
        b94_7.invoke()
    if c94_7=='1' and b94_7var.get()==0:
        b94_7.invoke()
    if c94_8=='0' and b94_8var.get()==1:
        b94_8.invoke()
    if c94_8=='1' and b94_8var.get()==0:
        b94_8.invoke()
    if c94_9=='0' and b94_9var.get()==1:
        b94_9invoke()
    if c94_9=='1' and b94_9var.get()==0:
        b94_9.invoke()
    if c94_10=='0' and b94_10var.get()==1:
        b94_10.invoke()
    if c94_10=='1' and b94_10var.get()==0:
        b94_10.invoke()
    if c94_11=='0' and b94_11var.get()==1:
        b94_11.invoke()
    if c94_11=='1' and b94_11var.get()==0:
        b94_11.invoke()
    if c94_12=='0' and b94_12var.get()==1:
        b94_12.invoke()
    if c94_12=='1' and b94_12var.get()==0:
        b94_12.invoke()
    if c94_13=='0' and b94_13var.get()==1:
        b94_13.invoke()
    if c94_13=='1' and b94_13var.get()==0:
        b94_13.invoke()
    if c94_14=='0' and b94_14var.get()==1:
        b94_14.invoke()
    if c94_14=='1' and b94_14var.get()==0:
        b94_14.invoke()
    if c94_15=='0' and b94_15var.get()==1:
        b94_15.invoke()
    if c94_15=='1' and b94_15var.get()==0:
        b94_15.invoke()
    if c94_17=='0' and b94_17var.get()==1:
        b94_17.invoke()
    if c94_17=='1' and b94_17var.get()==0:
        b94_17.invoke()
    if tr_95=='1' and trig_95var.get()==0:
        trig_95.invoke()
       
    if c95_0=='0' and b95_0var.get()==1:
        b95_0.invoke()
    if c95_0=='1' and b95_0var.get()==0:
        b95_0.invoke()
    if c95_1=='0' and b95_1var.get()==1:
        b95_1.invoke()
    if c95_1=='1' and b95_1var.get()==0:
        b95_1.invoke()
    if c95_2=='0' and b95_2var.get()==1:
        b95_2.invoke()
    if c95_2=='1' and b95_2var.get()==0:
        b95_2.invoke()
    if c95_3=='0' and b95_3var.get()==1:
        b95_3.invoke()
    if c95_3=='1' and b95_3var.get()==0:
        b95_3.invoke()
    if c95_4=='0' and b95_4var.get()==1:
        b95_4.invoke()
    if c95_4=='1' and b95_4var.get()==0:
        b95_4.invoke()
    if c95_5=='0' and b95_5var.get()==1:
        b95_5.invoke()
    if c95_5=='1' and b95_5var.get()==0:
        b95_5.invoke()
    if c95_6=='0' and b95_6var.get()==1:
        b95_6.invoke()
    if c95_6=='1' and b95_6var.get()==0:
        b95_6.invoke()
    if c95_7=='0' and b95_7var.get()==1:
        b95_7.invoke()
    if c95_7=='1' and b95_7var.get()==0:
        b95_7.invoke()
    if c95_8=='0' and b95_8var.get()==1:
        b95_8.invoke()
    if c95_8=='1' and b95_8var.get()==0:
        b95_8.invoke()
    if c95_9=='0' and b95_9var.get()==1:
        b95_9invoke()
    if c95_9=='1' and b95_9var.get()==0:
        b95_9.invoke()
    if c95_10=='0' and b95_10var.get()==1:
        b95_10.invoke()
    if c95_10=='1' and b95_10var.get()==0:
        b95_10.invoke()
    if c95_11=='0' and b95_11var.get()==1:
        b95_11.invoke()
    if c95_11=='1' and b95_11var.get()==0:
        b95_11.invoke()
    if c95_12=='0' and b95_12var.get()==1:
        b95_12.invoke()
    if c95_12=='1' and b95_12var.get()==0:
        b95_12.invoke()
    if c95_13=='0' and b95_13var.get()==1:
        b95_13.invoke()
    if c95_13=='1' and b95_13var.get()==0:
        b95_13.invoke()
    if c95_14=='0' and b95_14var.get()==1:
        b95_14.invoke()
    if c95_14=='1' and b95_14var.get()==0:
        b95_14.invoke()
    if c95_15=='0' and b95_15var.get()==1:
        b95_15.invoke()
    if c95_15=='1' and b95_15var.get()==0:
        b95_15.invoke()
    if c95_17=='0' and b95_17var.get()==1:
        b95_17.invoke()
    if c95_17=='1' and b95_17var.get()==0:
        b95_17.invoke()
    if tr_96=='1' and trig_96var.get()==0:
        trig_96.invoke()
       
    if c96_0=='0' and b96_0var.get()==1:
        b96_0.invoke()
    if c96_0=='1' and b96_0var.get()==0:
        b96_0.invoke()
    if c96_1=='0' and b96_1var.get()==1:
        b96_1.invoke()
    if c96_1=='1' and b96_1var.get()==0:
        b96_1.invoke()
    if c96_2=='0' and b96_2var.get()==1:
        b96_2.invoke()
    if c96_2=='1' and b96_2var.get()==0:
        b96_2.invoke()
    if c96_3=='0' and b96_3var.get()==1:
        b96_3.invoke()
    if c96_3=='1' and b96_3var.get()==0:
        b96_3.invoke()
    if c96_4=='0' and b96_4var.get()==1:
        b96_4.invoke()
    if c96_4=='1' and b96_4var.get()==0:
        b96_4.invoke()
    if c96_5=='0' and b96_5var.get()==1:
        b96_5.invoke()
    if c96_5=='1' and b96_5var.get()==0:
        b96_5.invoke()
    if c96_6=='0' and b96_6var.get()==1:
        b96_6.invoke()
    if c96_6=='1' and b96_6var.get()==0:
        b96_6.invoke()
    if c96_7=='0' and b96_7var.get()==1:
        b96_7.invoke()
    if c96_7=='1' and b96_7var.get()==0:
        b96_7.invoke()
    if c96_8=='0' and b96_8var.get()==1:
        b96_8.invoke()
    if c96_8=='1' and b96_8var.get()==0:
        b96_8.invoke()
    if c96_9=='0' and b96_9var.get()==1:
        b96_9invoke()
    if c96_9=='1' and b96_9var.get()==0:
        b96_9.invoke()
    if c96_10=='0' and b96_10var.get()==1:
        b96_10.invoke()
    if c96_10=='1' and b96_10var.get()==0:
        b96_10.invoke()
    if c96_11=='0' and b96_11var.get()==1:
        b96_11.invoke()
    if c96_11=='1' and b96_11var.get()==0:
        b96_11.invoke()
    if c96_12=='0' and b96_12var.get()==1:
        b96_12.invoke()
    if c96_12=='1' and b96_12var.get()==0:
        b96_12.invoke()
    if c96_13=='0' and b96_13var.get()==1:
        b96_13.invoke()
    if c96_13=='1' and b96_13var.get()==0:
        b96_13.invoke()
    if c96_14=='0' and b96_14var.get()==1:
        b96_14.invoke()
    if c96_14=='1' and b96_14var.get()==0:
        b96_14.invoke()
    if c96_15=='0' and b96_15var.get()==1:
        b96_15.invoke()
    if c96_15=='1' and b96_15var.get()==0:
        b96_15.invoke()
    if c96_17=='0' and b96_17var.get()==1:
        b96_17.invoke()
    if c96_17=='1' and b96_17var.get()==0:
        b96_17.invoke()
    if tr_97=='1' and trig_97var.get()==0:
        trig_97.invoke()
       
    if c97_0=='0' and b97_0var.get()==1:
        b97_0.invoke()
    if c97_0=='1' and b97_0var.get()==0:
        b97_0.invoke()
    if c97_1=='0' and b97_1var.get()==1:
        b97_1.invoke()
    if c97_1=='1' and b97_1var.get()==0:
        b97_1.invoke()
    if c97_2=='0' and b97_2var.get()==1:
        b97_2.invoke()
    if c97_2=='1' and b97_2var.get()==0:
        b97_2.invoke()
    if c97_3=='0' and b97_3var.get()==1:
        b97_3.invoke()
    if c97_3=='1' and b97_3var.get()==0:
        b97_3.invoke()
    if c97_4=='0' and b97_4var.get()==1:
        b97_4.invoke()
    if c97_4=='1' and b97_4var.get()==0:
        b97_4.invoke()
    if c97_5=='0' and b97_5var.get()==1:
        b97_5.invoke()
    if c97_5=='1' and b97_5var.get()==0:
        b97_5.invoke()
    if c97_6=='0' and b97_6var.get()==1:
        b97_6.invoke()
    if c97_6=='1' and b97_6var.get()==0:
        b97_6.invoke()
    if c97_7=='0' and b97_7var.get()==1:
        b97_7.invoke()
    if c97_7=='1' and b97_7var.get()==0:
        b97_7.invoke()
    if c97_8=='0' and b97_8var.get()==1:
        b97_8.invoke()
    if c97_8=='1' and b97_8var.get()==0:
        b97_8.invoke()
    if c97_9=='0' and b97_9var.get()==1:
        b97_9invoke()
    if c97_9=='1' and b97_9var.get()==0:
        b97_9.invoke()
    if c97_10=='0' and b97_10var.get()==1:
        b97_10.invoke()
    if c97_10=='1' and b97_10var.get()==0:
        b97_10.invoke()
    if c97_11=='0' and b97_11var.get()==1:
        b97_11.invoke()
    if c97_11=='1' and b97_11var.get()==0:
        b97_11.invoke()
    if c97_12=='0' and b97_12var.get()==1:
        b97_12.invoke()
    if c97_12=='1' and b97_12var.get()==0:
        b97_12.invoke()
    if c97_13=='0' and b97_13var.get()==1:
        b97_13.invoke()
    if c97_13=='1' and b97_13var.get()==0:
        b97_13.invoke()
    if c97_14=='0' and b97_14var.get()==1:
        b97_14.invoke()
    if c97_14=='1' and b97_14var.get()==0:
        b97_14.invoke()
    if c97_15=='0' and b97_15var.get()==1:
        b97_15.invoke()
    if c97_15=='1' and b97_15var.get()==0:
        b97_15.invoke()
    if c97_17=='0' and b97_17var.get()==1:
        b97_17.invoke()
    if c97_17=='1' and b97_17var.get()==0:
        b97_17.invoke()
    if tr_98=='1' and trig_98var.get()==0:
        trig_98.invoke()
       
    if c98_0=='0' and b98_0var.get()==1:
        b98_0.invoke()
    if c98_0=='1' and b98_0var.get()==0:
        b98_0.invoke()
    if c98_1=='0' and b98_1var.get()==1:
        b98_1.invoke()
    if c98_1=='1' and b98_1var.get()==0:
        b98_1.invoke()
    if c98_2=='0' and b98_2var.get()==1:
        b98_2.invoke()
    if c98_2=='1' and b98_2var.get()==0:
        b98_2.invoke()
    if c98_3=='0' and b98_3var.get()==1:
        b98_3.invoke()
    if c98_3=='1' and b98_3var.get()==0:
        b98_3.invoke()
    if c98_4=='0' and b98_4var.get()==1:
        b98_4.invoke()
    if c98_4=='1' and b98_4var.get()==0:
        b98_4.invoke()
    if c98_5=='0' and b98_5var.get()==1:
        b98_5.invoke()
    if c98_5=='1' and b98_5var.get()==0:
        b98_5.invoke()
    if c98_6=='0' and b98_6var.get()==1:
        b98_6.invoke()
    if c98_6=='1' and b98_6var.get()==0:
        b98_6.invoke()
    if c98_7=='0' and b98_7var.get()==1:
        b98_7.invoke()
    if c98_7=='1' and b98_7var.get()==0:
        b98_7.invoke()
    if c98_8=='0' and b98_8var.get()==1:
        b98_8.invoke()
    if c98_8=='1' and b98_8var.get()==0:
        b98_8.invoke()
    if c98_9=='0' and b98_9var.get()==1:
        b98_9invoke()
    if c98_9=='1' and b98_9var.get()==0:
        b98_9.invoke()
    if c98_10=='0' and b98_10var.get()==1:
        b98_10.invoke()
    if c98_10=='1' and b98_10var.get()==0:
        b98_10.invoke()
    if c98_11=='0' and b98_11var.get()==1:
        b98_11.invoke()
    if c98_11=='1' and b98_11var.get()==0:
        b98_11.invoke()
    if c98_12=='0' and b98_12var.get()==1:
        b98_12.invoke()
    if c98_12=='1' and b98_12var.get()==0:
        b98_12.invoke()
    if c98_13=='0' and b98_13var.get()==1:
        b98_13.invoke()
    if c98_13=='1' and b98_13var.get()==0:
        b98_13.invoke()
    if c98_14=='0' and b98_14var.get()==1:
        b98_14.invoke()
    if c98_14=='1' and b98_14var.get()==0:
        b98_14.invoke()
    if c98_15=='0' and b98_15var.get()==1:
        b98_15.invoke()
    if c98_15=='1' and b98_15var.get()==0:
        b98_15.invoke()
    if c98_17=='0' and b98_17var.get()==1:
        b98_17.invoke()
    if c98_17=='1' and b98_17var.get()==0:
        b98_17.invoke()
    if tr_99=='1' and trig_99var.get()==0:
        trig_99.invoke()
       
    if c99_0=='0' and b99_0var.get()==1:
        b99_0.invoke()
    if c99_0=='1' and b99_0var.get()==0:
        b99_0.invoke()
    if c99_1=='0' and b99_1var.get()==1:
        b99_1.invoke()
    if c99_1=='1' and b99_1var.get()==0:
        b99_1.invoke()
    if c99_2=='0' and b99_2var.get()==1:
        b99_2.invoke()
    if c99_2=='1' and b99_2var.get()==0:
        b99_2.invoke()
    if c99_3=='0' and b99_3var.get()==1:
        b99_3.invoke()
    if c99_3=='1' and b99_3var.get()==0:
        b99_3.invoke()
    if c99_4=='0' and b99_4var.get()==1:
        b99_4.invoke()
    if c99_4=='1' and b99_4var.get()==0:
        b99_4.invoke()
    if c99_5=='0' and b99_5var.get()==1:
        b99_5.invoke()
    if c99_5=='1' and b99_5var.get()==0:
        b99_5.invoke()
    if c99_6=='0' and b99_6var.get()==1:
        b99_6.invoke()
    if c99_6=='1' and b99_6var.get()==0:
        b99_6.invoke()
    if c99_7=='0' and b99_7var.get()==1:
        b99_7.invoke()
    if c99_7=='1' and b99_7var.get()==0:
        b99_7.invoke()
    if c99_8=='0' and b99_8var.get()==1:
        b99_8.invoke()
    if c99_8=='1' and b99_8var.get()==0:
        b99_8.invoke()
    if c99_9=='0' and b99_9var.get()==1:
        b99_9invoke()
    if c99_9=='1' and b99_9var.get()==0:
        b99_9.invoke()
    if c99_10=='0' and b99_10var.get()==1:
        b99_10.invoke()
    if c99_10=='1' and b99_10var.get()==0:
        b99_10.invoke()
    if c99_11=='0' and b99_11var.get()==1:
        b99_11.invoke()
    if c99_11=='1' and b99_11var.get()==0:
        b99_11.invoke()
    if c99_12=='0' and b99_12var.get()==1:
        b99_12.invoke()
    if c99_12=='1' and b99_12var.get()==0:
        b99_12.invoke()
    if c99_13=='0' and b99_13var.get()==1:
        b99_13.invoke()
    if c99_13=='1' and b99_13var.get()==0:
        b99_13.invoke()
    if c99_14=='0' and b99_14var.get()==1:
        b99_14.invoke()
    if c99_14=='1' and b99_14var.get()==0:
        b99_14.invoke()
    if c99_15=='0' and b99_15var.get()==1:
        b99_15.invoke()
    if c99_15=='1' and b99_15var.get()==0:
        b99_15.invoke()
    if c99_17=='0' and b99_17var.get()==1:
        b99_17.invoke()
    if c99_17=='1' and b99_17var.get()==0:
        b99_17.invoke()
    if tr_100=='1' and trig_100var.get()==0:
        trig_100.invoke()
    if c96_loop==0 and loop_var.get()==1:
        loop_0.invoke()
    if c96_loop==1 and loop_var.get()==0:
        loop_0.invoke()

# save data
def file_save():
    f = tkFileDialog.asksaveasfile(mode='w', defaultextension=".trg", filetypes=[('Trigger files', '.trg'), ('Text Files', '.txt'), ('All Files', '.*')])
    if f is None:
        return

    f.write (str(b0_0var.get())+' '+str(b0_1var.get())+' '+str(b0_2var.get())+' '+str(b0_3var.get())+' '+str(b0_4var.get())+' '+str(b0_5var.get())+' '+str(b0_6var.get())+' ')
    f.write (str(b0_7var.get())+' '+str(b0_8var.get())+' '+str(b0_9var.get())+' '+str(b0_10var.get())+' '+str(b0_11var.get())+' '+str(b0_12var.get())+' '+str(b0_13var.get())+' ')
    f.write (str(b0_14var.get())+' '+str(b0_15var.get())+' '+str(b0_16var.get())+' '+str(b0_17var.get())+' '+str(trig_1var.get())+' ')
    f.write (str(b1_0var.get())+' '+str(b1_1var.get())+' '+str(b1_2var.get())+' '+str(b1_3var.get())+' '+str(b1_4var.get())+' '+str(b1_5var.get())+' '+str(b1_6var.get())+' ')
    f.write (str(b1_7var.get())+' '+str(b1_8var.get())+' '+str(b1_9var.get())+' '+str(b1_10var.get())+' '+str(b1_11var.get())+' '+str(b1_12var.get())+' '+str(b1_13var.get())+' ')
    f.write (str(b1_14var.get())+' '+str(b1_15var.get())+' '+str(b1_17var.get())+' '+str(trig_2var.get())+' ')
    f.write (str(b2_0var.get())+' '+str(b2_1var.get())+' '+str(b2_2var.get())+' '+str(b2_3var.get())+' '+str(b2_4var.get())+' '+str(b2_5var.get())+' '+str(b2_6var.get())+' ')
    f.write (str(b2_7var.get())+' '+str(b2_8var.get())+' '+str(b2_9var.get())+' '+str(b2_10var.get())+' '+str(b2_11var.get())+' '+str(b2_12var.get())+' '+str(b2_13var.get())+' ')
    f.write (str(b2_14var.get())+' '+str(b2_15var.get())+' '+str(b2_17var.get())+' '+str(trig_3var.get())+' ')
    f.write (str(b3_0var.get())+' '+str(b3_1var.get())+' '+str(b3_2var.get())+' '+str(b3_3var.get())+' '+str(b3_4var.get())+' '+str(b3_5var.get())+' '+str(b3_6var.get())+' ')
    f.write (str(b3_7var.get())+' '+str(b3_8var.get())+' '+str(b3_9var.get())+' '+str(b3_10var.get())+' '+str(b3_11var.get())+' '+str(b3_12var.get())+' '+str(b3_13var.get())+' ')
    f.write (str(b3_14var.get())+' '+str(b3_15var.get())+' '+str(b3_17var.get())+' '+str(trig_4var.get())+' ')
    f.write (str(b4_0var.get())+' '+str(b4_1var.get())+' '+str(b4_2var.get())+' '+str(b4_3var.get())+' '+str(b4_4var.get())+' '+str(b4_5var.get())+' '+str(b4_6var.get())+' ')
    f.write (str(b4_7var.get())+' '+str(b4_8var.get())+' '+str(b4_9var.get())+' '+str(b4_10var.get())+' '+str(b4_11var.get())+' '+str(b4_12var.get())+' '+str(b4_13var.get())+' ')
    f.write (str(b4_14var.get())+' '+str(b4_15var.get())+' '+str(b4_17var.get())+' '+str(trig_5var.get())+' ')
    f.write (str(b5_0var.get())+' '+str(b5_1var.get())+' '+str(b5_2var.get())+' '+str(b5_3var.get())+' '+str(b5_4var.get())+' '+str(b5_5var.get())+' '+str(b5_6var.get())+' ')
    f.write (str(b5_7var.get())+' '+str(b5_8var.get())+' '+str(b5_9var.get())+' '+str(b5_10var.get())+' '+str(b5_11var.get())+' '+str(b5_12var.get())+' '+str(b5_13var.get())+' ')
    f.write (str(b5_14var.get())+' '+str(b5_15var.get())+' '+str(b5_17var.get())+' '+str(trig_6var.get())+' ')
    f.write (str(b6_0var.get())+' '+str(b6_1var.get())+' '+str(b6_2var.get())+' '+str(b6_3var.get())+' '+str(b6_4var.get())+' '+str(b6_5var.get())+' '+str(b6_6var.get())+' ')
    f.write (str(b6_7var.get())+' '+str(b6_8var.get())+' '+str(b6_9var.get())+' '+str(b6_10var.get())+' '+str(b6_11var.get())+' '+str(b6_12var.get())+' '+str(b6_13var.get())+' ')
    f.write (str(b6_14var.get())+' '+str(b6_15var.get())+' '+str(b6_17var.get())+' '+str(trig_7var.get())+' ')
    f.write (str(b7_0var.get())+' '+str(b7_1var.get())+' '+str(b7_2var.get())+' '+str(b7_3var.get())+' '+str(b7_4var.get())+' '+str(b7_5var.get())+' '+str(b7_6var.get())+' ')
    f.write (str(b7_7var.get())+' '+str(b7_8var.get())+' '+str(b7_9var.get())+' '+str(b7_10var.get())+' '+str(b7_11var.get())+' '+str(b7_12var.get())+' '+str(b7_13var.get())+' ')
    f.write (str(b7_14var.get())+' '+str(b7_15var.get())+' '+str(b7_17var.get())+' '+str(trig_8var.get())+' ')
    f.write (str(b8_0var.get())+' '+str(b8_1var.get())+' '+str(b8_2var.get())+' '+str(b8_3var.get())+' '+str(b8_4var.get())+' '+str(b8_5var.get())+' '+str(b8_6var.get())+' ')
    f.write (str(b8_7var.get())+' '+str(b8_8var.get())+' '+str(b8_9var.get())+' '+str(b8_10var.get())+' '+str(b8_11var.get())+' '+str(b8_12var.get())+' '+str(b8_13var.get())+' ')
    f.write (str(b8_14var.get())+' '+str(b8_15var.get())+' '+str(b8_17var.get())+' '+str(trig_9var.get())+' ')
    f.write (str(b9_0var.get())+' '+str(b9_1var.get())+' '+str(b9_2var.get())+' '+str(b9_3var.get())+' '+str(b9_4var.get())+' '+str(b9_5var.get())+' '+str(b9_6var.get())+' ')
    f.write (str(b9_7var.get())+' '+str(b9_8var.get())+' '+str(b9_9var.get())+' '+str(b9_10var.get())+' '+str(b9_11var.get())+' '+str(b9_12var.get())+' '+str(b9_13var.get())+' ')
    f.write (str(b9_14var.get())+' '+str(b9_15var.get())+' '+str(b9_17var.get())+' '+str(trig_10var.get())+' ')
    f.write (str(b10_0var.get())+' '+str(b10_1var.get())+' '+str(b10_2var.get())+' '+str(b10_3var.get())+' '+str(b10_4var.get())+' '+str(b10_5var.get())+' '+str(b10_6var.get())+' ')
    f.write (str(b10_7var.get())+' '+str(b10_8var.get())+' '+str(b10_9var.get())+' '+str(b10_10var.get())+' '+str(b10_11var.get())+' '+str(b10_12var.get())+' '+str(b10_13var.get())+' ')
    f.write (str(b10_14var.get())+' '+str(b10_15var.get())+' '+str(b10_17var.get())+' '+str(trig_11var.get())+' ')
    f.write (str(b11_0var.get())+' '+str(b11_1var.get())+' '+str(b11_2var.get())+' '+str(b11_3var.get())+' '+str(b11_4var.get())+' '+str(b11_5var.get())+' '+str(b11_6var.get())+' ')
    f.write (str(b11_7var.get())+' '+str(b11_8var.get())+' '+str(b11_9var.get())+' '+str(b11_10var.get())+' '+str(b11_11var.get())+' '+str(b11_12var.get())+' '+str(b11_13var.get())+' ')
    f.write (str(b11_14var.get())+' '+str(b11_15var.get())+' '+str(b11_17var.get())+' '+str(trig_12var.get())+' ')
    f.write (str(b12_0var.get())+' '+str(b12_1var.get())+' '+str(b12_2var.get())+' '+str(b12_3var.get())+' '+str(b12_4var.get())+' '+str(b12_5var.get())+' '+str(b12_6var.get())+' ')
    f.write (str(b12_7var.get())+' '+str(b12_8var.get())+' '+str(b12_9var.get())+' '+str(b12_10var.get())+' '+str(b12_11var.get())+' '+str(b12_12var.get())+' '+str(b12_13var.get())+' ')
    f.write (str(b12_14var.get())+' '+str(b12_15var.get())+' '+str(b12_17var.get())+' '+str(trig_13var.get())+' ')
    f.write (str(b13_0var.get())+' '+str(b13_1var.get())+' '+str(b13_2var.get())+' '+str(b13_3var.get())+' '+str(b13_4var.get())+' '+str(b13_5var.get())+' '+str(b13_6var.get())+' ')
    f.write (str(b13_7var.get())+' '+str(b13_8var.get())+' '+str(b13_9var.get())+' '+str(b13_10var.get())+' '+str(b13_11var.get())+' '+str(b13_12var.get())+' '+str(b13_13var.get())+' ')
    f.write (str(b13_14var.get())+' '+str(b13_15var.get())+' '+str(b13_17var.get())+' '+str(trig_14var.get())+' ')
    f.write (str(b14_0var.get())+' '+str(b14_1var.get())+' '+str(b14_2var.get())+' '+str(b14_3var.get())+' '+str(b14_4var.get())+' '+str(b14_5var.get())+' '+str(b14_6var.get())+' ')
    f.write (str(b14_7var.get())+' '+str(b14_8var.get())+' '+str(b14_9var.get())+' '+str(b14_10var.get())+' '+str(b14_11var.get())+' '+str(b14_12var.get())+' '+str(b14_13var.get())+' ')
    f.write (str(b14_14var.get())+' '+str(b14_15var.get())+' '+str(b14_17var.get())+' '+str(trig_15var.get())+' ')
    f.write (str(b15_0var.get())+' '+str(b15_1var.get())+' '+str(b15_2var.get())+' '+str(b15_3var.get())+' '+str(b15_4var.get())+' '+str(b15_5var.get())+' '+str(b15_6var.get())+' ')
    f.write (str(b15_7var.get())+' '+str(b15_8var.get())+' '+str(b15_9var.get())+' '+str(b15_10var.get())+' '+str(b15_11var.get())+' '+str(b15_12var.get())+' '+str(b15_13var.get())+' ')
    f.write (str(b15_14var.get())+' '+str(b15_15var.get())+' '+str(b15_17var.get())+' '+str(trig_16var.get())+' ')
    f.write (str(b16_0var.get())+' '+str(b16_1var.get())+' '+str(b16_2var.get())+' '+str(b16_3var.get())+' '+str(b16_4var.get())+' '+str(b16_5var.get())+' '+str(b16_6var.get())+' ')
    f.write (str(b16_7var.get())+' '+str(b16_8var.get())+' '+str(b16_9var.get())+' '+str(b16_10var.get())+' '+str(b16_11var.get())+' '+str(b16_12var.get())+' '+str(b16_13var.get())+' ')
    f.write (str(b16_14var.get())+' '+str(b16_15var.get())+' '+str(b16_17var.get())+' '+str(trig_17var.get())+' ')
    f.write (str(b17_0var.get())+' '+str(b17_1var.get())+' '+str(b17_2var.get())+' '+str(b17_3var.get())+' '+str(b17_4var.get())+' '+str(b17_5var.get())+' '+str(b17_6var.get())+' ')
    f.write (str(b17_7var.get())+' '+str(b17_8var.get())+' '+str(b17_9var.get())+' '+str(b17_10var.get())+' '+str(b17_11var.get())+' '+str(b17_12var.get())+' '+str(b17_13var.get())+' ')
    f.write (str(b17_14var.get())+' '+str(b17_15var.get())+' '+str(b17_17var.get())+' '+str(trig_18var.get())+' ')
    f.write (str(b18_0var.get())+' '+str(b18_1var.get())+' '+str(b18_2var.get())+' '+str(b18_3var.get())+' '+str(b18_4var.get())+' '+str(b18_5var.get())+' '+str(b18_6var.get())+' ')
    f.write (str(b18_7var.get())+' '+str(b18_8var.get())+' '+str(b18_9var.get())+' '+str(b18_10var.get())+' '+str(b18_11var.get())+' '+str(b18_12var.get())+' '+str(b18_13var.get())+' ')
    f.write (str(b18_14var.get())+' '+str(b18_15var.get())+' '+str(b18_17var.get())+' '+str(trig_19var.get())+' ')
    f.write (str(b19_0var.get())+' '+str(b19_1var.get())+' '+str(b19_2var.get())+' '+str(b19_3var.get())+' '+str(b19_4var.get())+' '+str(b19_5var.get())+' '+str(b19_6var.get())+' ')
    f.write (str(b19_7var.get())+' '+str(b19_8var.get())+' '+str(b19_9var.get())+' '+str(b19_10var.get())+' '+str(b19_11var.get())+' '+str(b19_12var.get())+' '+str(b19_13var.get())+' ')
    f.write (str(b19_14var.get())+' '+str(b19_15var.get())+' '+str(b19_17var.get())+' '+str(trig_20var.get())+' ')
    f.write (str(b20_0var.get())+' '+str(b20_1var.get())+' '+str(b20_2var.get())+' '+str(b20_3var.get())+' '+str(b20_4var.get())+' '+str(b20_5var.get())+' '+str(b20_6var.get())+' ')
    f.write (str(b20_7var.get())+' '+str(b20_8var.get())+' '+str(b20_9var.get())+' '+str(b20_10var.get())+' '+str(b20_11var.get())+' '+str(b20_12var.get())+' '+str(b20_13var.get())+' ')
    f.write (str(b20_14var.get())+' '+str(b20_15var.get())+' '+str(b20_17var.get())+' '+str(trig_21var.get())+' ')
    f.write (str(b21_0var.get())+' '+str(b21_1var.get())+' '+str(b21_2var.get())+' '+str(b21_3var.get())+' '+str(b21_4var.get())+' '+str(b21_5var.get())+' '+str(b21_6var.get())+' ')
    f.write (str(b21_7var.get())+' '+str(b21_8var.get())+' '+str(b21_9var.get())+' '+str(b21_10var.get())+' '+str(b21_11var.get())+' '+str(b21_12var.get())+' '+str(b21_13var.get())+' ')
    f.write (str(b21_14var.get())+' '+str(b21_15var.get())+' '+str(b21_17var.get())+' '+str(trig_22var.get())+' ')
    f.write (str(b22_0var.get())+' '+str(b22_1var.get())+' '+str(b22_2var.get())+' '+str(b22_3var.get())+' '+str(b22_4var.get())+' '+str(b22_5var.get())+' '+str(b22_6var.get())+' ')
    f.write (str(b22_7var.get())+' '+str(b22_8var.get())+' '+str(b22_9var.get())+' '+str(b22_10var.get())+' '+str(b22_11var.get())+' '+str(b22_12var.get())+' '+str(b22_13var.get())+' ')
    f.write (str(b22_14var.get())+' '+str(b22_15var.get())+' '+str(b22_17var.get())+' '+str(trig_23var.get())+' ')
    f.write (str(b23_0var.get())+' '+str(b23_1var.get())+' '+str(b23_2var.get())+' '+str(b23_3var.get())+' '+str(b23_4var.get())+' '+str(b23_5var.get())+' '+str(b23_6var.get())+' ')
    f.write (str(b23_7var.get())+' '+str(b23_8var.get())+' '+str(b23_9var.get())+' '+str(b23_10var.get())+' '+str(b23_11var.get())+' '+str(b23_12var.get())+' '+str(b23_13var.get())+' ')
    f.write (str(b23_14var.get())+' '+str(b23_15var.get())+' '+str(b23_17var.get())+' '+str(trig_24var.get())+' ')
    f.write (str(b24_0var.get())+' '+str(b24_1var.get())+' '+str(b24_2var.get())+' '+str(b24_3var.get())+' '+str(b24_4var.get())+' '+str(b24_5var.get())+' '+str(b24_6var.get())+' ')
    f.write (str(b24_7var.get())+' '+str(b24_8var.get())+' '+str(b24_9var.get())+' '+str(b24_10var.get())+' '+str(b24_11var.get())+' '+str(b24_12var.get())+' '+str(b24_13var.get())+' ')
    f.write (str(b24_14var.get())+' '+str(b24_15var.get())+' '+str(b24_17var.get())+' '+str(trig_25var.get())+' ')
    f.write (str(b25_0var.get())+' '+str(b25_1var.get())+' '+str(b25_2var.get())+' '+str(b25_3var.get())+' '+str(b25_4var.get())+' '+str(b25_5var.get())+' '+str(b25_6var.get())+' ')
    f.write (str(b25_7var.get())+' '+str(b25_8var.get())+' '+str(b25_9var.get())+' '+str(b25_10var.get())+' '+str(b25_11var.get())+' '+str(b25_12var.get())+' '+str(b25_13var.get())+' ')
    f.write (str(b25_14var.get())+' '+str(b25_15var.get())+' '+str(b25_17var.get())+' '+str(trig_26var.get())+' ')
    f.write (str(b26_0var.get())+' '+str(b26_1var.get())+' '+str(b26_2var.get())+' '+str(b26_3var.get())+' '+str(b26_4var.get())+' '+str(b26_5var.get())+' '+str(b26_6var.get())+' ')
    f.write (str(b26_7var.get())+' '+str(b26_8var.get())+' '+str(b26_9var.get())+' '+str(b26_10var.get())+' '+str(b26_11var.get())+' '+str(b26_12var.get())+' '+str(b26_13var.get())+' ')
    f.write (str(b26_14var.get())+' '+str(b26_15var.get())+' '+str(b26_17var.get())+' '+str(trig_27var.get())+' ')
    f.write (str(b27_0var.get())+' '+str(b27_1var.get())+' '+str(b27_2var.get())+' '+str(b27_3var.get())+' '+str(b27_4var.get())+' '+str(b27_5var.get())+' '+str(b27_6var.get())+' ')
    f.write (str(b27_7var.get())+' '+str(b27_8var.get())+' '+str(b27_9var.get())+' '+str(b27_10var.get())+' '+str(b27_11var.get())+' '+str(b27_12var.get())+' '+str(b27_13var.get())+' ')
    f.write (str(b27_14var.get())+' '+str(b27_15var.get())+' '+str(b27_17var.get())+' '+str(trig_28var.get())+' ')
    f.write (str(b28_0var.get())+' '+str(b28_1var.get())+' '+str(b28_2var.get())+' '+str(b28_3var.get())+' '+str(b28_4var.get())+' '+str(b28_5var.get())+' '+str(b28_6var.get())+' ')
    f.write (str(b28_7var.get())+' '+str(b28_8var.get())+' '+str(b28_9var.get())+' '+str(b28_10var.get())+' '+str(b28_11var.get())+' '+str(b28_12var.get())+' '+str(b28_13var.get())+' ')
    f.write (str(b28_14var.get())+' '+str(b28_15var.get())+' '+str(b28_17var.get())+' '+str(trig_29var.get())+' ')
    f.write (str(b29_0var.get())+' '+str(b29_1var.get())+' '+str(b29_2var.get())+' '+str(b29_3var.get())+' '+str(b29_4var.get())+' '+str(b29_5var.get())+' '+str(b29_6var.get())+' ')
    f.write (str(b29_7var.get())+' '+str(b29_8var.get())+' '+str(b29_9var.get())+' '+str(b29_10var.get())+' '+str(b29_11var.get())+' '+str(b29_12var.get())+' '+str(b29_13var.get())+' ')
    f.write (str(b29_14var.get())+' '+str(b29_15var.get())+' '+str(b29_17var.get())+' '+str(trig_30var.get())+' ')
    f.write (str(b30_0var.get())+' '+str(b30_1var.get())+' '+str(b30_2var.get())+' '+str(b30_3var.get())+' '+str(b30_4var.get())+' '+str(b30_5var.get())+' '+str(b30_6var.get())+' ')
    f.write (str(b30_7var.get())+' '+str(b30_8var.get())+' '+str(b30_9var.get())+' '+str(b30_10var.get())+' '+str(b30_11var.get())+' '+str(b30_12var.get())+' '+str(b30_13var.get())+' ')
    f.write (str(b30_14var.get())+' '+str(b30_15var.get())+' '+str(b30_17var.get())+' '+str(trig_31var.get())+' ')
    f.write (str(b31_0var.get())+' '+str(b31_1var.get())+' '+str(b31_2var.get())+' '+str(b31_3var.get())+' '+str(b31_4var.get())+' '+str(b31_5var.get())+' '+str(b31_6var.get())+' ')
    f.write (str(b31_7var.get())+' '+str(b31_8var.get())+' '+str(b31_9var.get())+' '+str(b31_10var.get())+' '+str(b31_11var.get())+' '+str(b31_12var.get())+' '+str(b31_13var.get())+' ')
    f.write (str(b31_14var.get())+' '+str(b31_15var.get())+' '+str(b31_17var.get())+' '+str(trig_32var.get())+' ')
    f.write (str(b32_0var.get())+' '+str(b32_1var.get())+' '+str(b32_2var.get())+' '+str(b32_3var.get())+' '+str(b32_4var.get())+' '+str(b32_5var.get())+' '+str(b32_6var.get())+' ')
    f.write (str(b32_7var.get())+' '+str(b32_8var.get())+' '+str(b32_9var.get())+' '+str(b32_10var.get())+' '+str(b32_11var.get())+' '+str(b32_12var.get())+' '+str(b32_13var.get())+' ')
    f.write (str(b32_14var.get())+' '+str(b32_15var.get())+' '+str(b32_17var.get())+' '+str(trig_33var.get())+' ')
    f.write (str(b33_0var.get())+' '+str(b33_1var.get())+' '+str(b33_2var.get())+' '+str(b33_3var.get())+' '+str(b33_4var.get())+' '+str(b33_5var.get())+' '+str(b33_6var.get())+' ')
    f.write (str(b33_7var.get())+' '+str(b33_8var.get())+' '+str(b33_9var.get())+' '+str(b33_10var.get())+' '+str(b33_11var.get())+' '+str(b33_12var.get())+' '+str(b33_13var.get())+' ')
    f.write (str(b33_14var.get())+' '+str(b33_15var.get())+' '+str(b33_17var.get())+' '+str(trig_34var.get())+' ')
    f.write (str(b34_0var.get())+' '+str(b34_1var.get())+' '+str(b34_2var.get())+' '+str(b34_3var.get())+' '+str(b34_4var.get())+' '+str(b34_5var.get())+' '+str(b34_6var.get())+' ')
    f.write (str(b34_7var.get())+' '+str(b34_8var.get())+' '+str(b34_9var.get())+' '+str(b34_10var.get())+' '+str(b34_11var.get())+' '+str(b34_12var.get())+' '+str(b34_13var.get())+' ')
    f.write (str(b34_14var.get())+' '+str(b34_15var.get())+' '+str(b34_17var.get())+' '+str(trig_35var.get())+' ')
    f.write (str(b35_0var.get())+' '+str(b35_1var.get())+' '+str(b35_2var.get())+' '+str(b35_3var.get())+' '+str(b35_4var.get())+' '+str(b35_5var.get())+' '+str(b35_6var.get())+' ')
    f.write (str(b35_7var.get())+' '+str(b35_8var.get())+' '+str(b35_9var.get())+' '+str(b35_10var.get())+' '+str(b35_11var.get())+' '+str(b35_12var.get())+' '+str(b35_13var.get())+' ')
    f.write (str(b35_14var.get())+' '+str(b35_15var.get())+' '+str(b35_17var.get())+' '+str(trig_36var.get())+' ')
    f.write (str(b36_0var.get())+' '+str(b36_1var.get())+' '+str(b36_2var.get())+' '+str(b36_3var.get())+' '+str(b36_4var.get())+' '+str(b36_5var.get())+' '+str(b36_6var.get())+' ')
    f.write (str(b36_7var.get())+' '+str(b36_8var.get())+' '+str(b36_9var.get())+' '+str(b36_10var.get())+' '+str(b36_11var.get())+' '+str(b36_12var.get())+' '+str(b36_13var.get())+' ')
    f.write (str(b36_14var.get())+' '+str(b36_15var.get())+' '+str(b36_17var.get())+' '+str(trig_37var.get())+' ')
    f.write (str(b37_0var.get())+' '+str(b37_1var.get())+' '+str(b37_2var.get())+' '+str(b37_3var.get())+' '+str(b37_4var.get())+' '+str(b37_5var.get())+' '+str(b37_6var.get())+' ')
    f.write (str(b37_7var.get())+' '+str(b37_8var.get())+' '+str(b37_9var.get())+' '+str(b37_10var.get())+' '+str(b37_11var.get())+' '+str(b37_12var.get())+' '+str(b37_13var.get())+' ')
    f.write (str(b37_14var.get())+' '+str(b37_15var.get())+' '+str(b37_17var.get())+' '+str(trig_38var.get())+' ')
    f.write (str(b38_0var.get())+' '+str(b38_1var.get())+' '+str(b38_2var.get())+' '+str(b38_3var.get())+' '+str(b38_4var.get())+' '+str(b38_5var.get())+' '+str(b38_6var.get())+' ')
    f.write (str(b38_7var.get())+' '+str(b38_8var.get())+' '+str(b38_9var.get())+' '+str(b38_10var.get())+' '+str(b38_11var.get())+' '+str(b38_12var.get())+' '+str(b38_13var.get())+' ')
    f.write (str(b38_14var.get())+' '+str(b38_15var.get())+' '+str(b38_17var.get())+' '+str(trig_39var.get())+' ')
    f.write (str(b39_0var.get())+' '+str(b39_1var.get())+' '+str(b39_2var.get())+' '+str(b39_3var.get())+' '+str(b39_4var.get())+' '+str(b39_5var.get())+' '+str(b39_6var.get())+' ')
    f.write (str(b39_7var.get())+' '+str(b39_8var.get())+' '+str(b39_9var.get())+' '+str(b39_10var.get())+' '+str(b39_11var.get())+' '+str(b39_12var.get())+' '+str(b39_13var.get())+' ')
    f.write (str(b39_14var.get())+' '+str(b39_15var.get())+' '+str(b39_17var.get())+' '+str(trig_40var.get())+' ')
    f.write (str(b40_0var.get())+' '+str(b40_1var.get())+' '+str(b40_2var.get())+' '+str(b40_3var.get())+' '+str(b40_4var.get())+' '+str(b40_5var.get())+' '+str(b40_6var.get())+' ')
    f.write (str(b40_7var.get())+' '+str(b40_8var.get())+' '+str(b40_9var.get())+' '+str(b40_10var.get())+' '+str(b40_11var.get())+' '+str(b40_12var.get())+' '+str(b40_13var.get())+' ')
    f.write (str(b40_14var.get())+' '+str(b40_15var.get())+' '+str(b40_17var.get())+' '+str(trig_41var.get())+' ')
    f.write (str(b41_0var.get())+' '+str(b41_1var.get())+' '+str(b41_2var.get())+' '+str(b41_3var.get())+' '+str(b41_4var.get())+' '+str(b41_5var.get())+' '+str(b41_6var.get())+' ')
    f.write (str(b41_7var.get())+' '+str(b41_8var.get())+' '+str(b41_9var.get())+' '+str(b41_10var.get())+' '+str(b41_11var.get())+' '+str(b41_12var.get())+' '+str(b41_13var.get())+' ')
    f.write (str(b41_14var.get())+' '+str(b41_15var.get())+' '+str(b41_17var.get())+' '+str(trig_42var.get())+' ')
    f.write (str(b42_0var.get())+' '+str(b42_1var.get())+' '+str(b42_2var.get())+' '+str(b42_3var.get())+' '+str(b42_4var.get())+' '+str(b42_5var.get())+' '+str(b42_6var.get())+' ')
    f.write (str(b42_7var.get())+' '+str(b42_8var.get())+' '+str(b42_9var.get())+' '+str(b42_10var.get())+' '+str(b42_11var.get())+' '+str(b42_12var.get())+' '+str(b42_13var.get())+' ')
    f.write (str(b42_14var.get())+' '+str(b42_15var.get())+' '+str(b42_17var.get())+' '+str(trig_43var.get())+' ')
    f.write (str(b43_0var.get())+' '+str(b43_1var.get())+' '+str(b43_2var.get())+' '+str(b43_3var.get())+' '+str(b43_4var.get())+' '+str(b43_5var.get())+' '+str(b43_6var.get())+' ')
    f.write (str(b43_7var.get())+' '+str(b43_8var.get())+' '+str(b43_9var.get())+' '+str(b43_10var.get())+' '+str(b43_11var.get())+' '+str(b43_12var.get())+' '+str(b43_13var.get())+' ')
    f.write (str(b43_14var.get())+' '+str(b43_15var.get())+' '+str(b43_17var.get())+' '+str(trig_44var.get())+' ')
    f.write (str(b44_0var.get())+' '+str(b44_1var.get())+' '+str(b44_2var.get())+' '+str(b44_3var.get())+' '+str(b44_4var.get())+' '+str(b44_5var.get())+' '+str(b44_6var.get())+' ')
    f.write (str(b44_7var.get())+' '+str(b44_8var.get())+' '+str(b44_9var.get())+' '+str(b44_10var.get())+' '+str(b44_11var.get())+' '+str(b44_12var.get())+' '+str(b44_13var.get())+' ')
    f.write (str(b44_14var.get())+' '+str(b44_15var.get())+' '+str(b44_17var.get())+' '+str(trig_45var.get())+' ')
    f.write (str(b45_0var.get())+' '+str(b45_1var.get())+' '+str(b45_2var.get())+' '+str(b45_3var.get())+' '+str(b45_4var.get())+' '+str(b45_5var.get())+' '+str(b45_6var.get())+' ')
    f.write (str(b45_7var.get())+' '+str(b45_8var.get())+' '+str(b45_9var.get())+' '+str(b45_10var.get())+' '+str(b45_11var.get())+' '+str(b45_12var.get())+' '+str(b45_13var.get())+' ')
    f.write (str(b45_14var.get())+' '+str(b45_15var.get())+' '+str(b45_17var.get())+' '+str(trig_46var.get())+' ')
    f.write (str(b46_0var.get())+' '+str(b46_1var.get())+' '+str(b46_2var.get())+' '+str(b46_3var.get())+' '+str(b46_4var.get())+' '+str(b46_5var.get())+' '+str(b46_6var.get())+' ')
    f.write (str(b46_7var.get())+' '+str(b46_8var.get())+' '+str(b46_9var.get())+' '+str(b46_10var.get())+' '+str(b46_11var.get())+' '+str(b46_12var.get())+' '+str(b46_13var.get())+' ')
    f.write (str(b46_14var.get())+' '+str(b46_15var.get())+' '+str(b46_17var.get())+' '+str(trig_47var.get())+' ')
    f.write (str(b47_0var.get())+' '+str(b47_1var.get())+' '+str(b47_2var.get())+' '+str(b47_3var.get())+' '+str(b47_4var.get())+' '+str(b47_5var.get())+' '+str(b47_6var.get())+' ')
    f.write (str(b47_7var.get())+' '+str(b47_8var.get())+' '+str(b47_9var.get())+' '+str(b47_10var.get())+' '+str(b47_11var.get())+' '+str(b47_12var.get())+' '+str(b47_13var.get())+' ')
    f.write (str(b47_14var.get())+' '+str(b47_15var.get())+' '+str(b47_17var.get())+' '+str(trig_48var.get())+' ')
    f.write (str(b48_0var.get())+' '+str(b48_1var.get())+' '+str(b48_2var.get())+' '+str(b48_3var.get())+' '+str(b48_4var.get())+' '+str(b48_5var.get())+' '+str(b48_6var.get())+' ')
    f.write (str(b48_7var.get())+' '+str(b48_8var.get())+' '+str(b48_9var.get())+' '+str(b48_10var.get())+' '+str(b48_11var.get())+' '+str(b48_12var.get())+' '+str(b48_13var.get())+' ')
    f.write (str(b48_14var.get())+' '+str(b48_15var.get())+' '+str(b48_17var.get())+' '+str(trig_49var.get())+' ')
    f.write (str(b49_0var.get())+' '+str(b49_1var.get())+' '+str(b49_2var.get())+' '+str(b49_3var.get())+' '+str(b49_4var.get())+' '+str(b49_5var.get())+' '+str(b49_6var.get())+' ')
    f.write (str(b49_7var.get())+' '+str(b49_8var.get())+' '+str(b49_9var.get())+' '+str(b49_10var.get())+' '+str(b49_11var.get())+' '+str(b49_12var.get())+' '+str(b49_13var.get())+' ')
    f.write (str(b49_14var.get())+' '+str(b49_15var.get())+' '+str(b49_17var.get())+' '+str(trig_50var.get())+' ')
    f.write (str(b50_0var.get())+' '+str(b50_1var.get())+' '+str(b50_2var.get())+' '+str(b50_3var.get())+' '+str(b50_4var.get())+' '+str(b50_5var.get())+' '+str(b50_6var.get())+' ')
    f.write (str(b50_7var.get())+' '+str(b50_8var.get())+' '+str(b50_9var.get())+' '+str(b50_10var.get())+' '+str(b50_11var.get())+' '+str(b50_12var.get())+' '+str(b50_13var.get())+' ')
    f.write (str(b50_14var.get())+' '+str(b50_15var.get())+' '+str(b50_17var.get())+' '+str(trig_51var.get())+' ')
    f.write (str(b51_0var.get())+' '+str(b51_1var.get())+' '+str(b51_2var.get())+' '+str(b51_3var.get())+' '+str(b51_4var.get())+' '+str(b51_5var.get())+' '+str(b51_6var.get())+' ')
    f.write (str(b51_7var.get())+' '+str(b51_8var.get())+' '+str(b51_9var.get())+' '+str(b51_10var.get())+' '+str(b51_11var.get())+' '+str(b51_12var.get())+' '+str(b51_13var.get())+' ')
    f.write (str(b51_14var.get())+' '+str(b51_15var.get())+' '+str(b51_17var.get())+' '+str(trig_52var.get())+' ')
    f.write (str(b52_0var.get())+' '+str(b52_1var.get())+' '+str(b52_2var.get())+' '+str(b52_3var.get())+' '+str(b52_4var.get())+' '+str(b52_5var.get())+' '+str(b52_6var.get())+' ')
    f.write (str(b52_7var.get())+' '+str(b52_8var.get())+' '+str(b52_9var.get())+' '+str(b52_10var.get())+' '+str(b52_11var.get())+' '+str(b52_12var.get())+' '+str(b52_13var.get())+' ')
    f.write (str(b52_14var.get())+' '+str(b52_15var.get())+' '+str(b52_17var.get())+' '+str(trig_53var.get())+' ')
    f.write (str(b53_0var.get())+' '+str(b53_1var.get())+' '+str(b53_2var.get())+' '+str(b53_3var.get())+' '+str(b53_4var.get())+' '+str(b53_5var.get())+' '+str(b53_6var.get())+' ')
    f.write (str(b53_7var.get())+' '+str(b53_8var.get())+' '+str(b53_9var.get())+' '+str(b53_10var.get())+' '+str(b53_11var.get())+' '+str(b53_12var.get())+' '+str(b53_13var.get())+' ')
    f.write (str(b53_14var.get())+' '+str(b53_15var.get())+' '+str(b53_17var.get())+' '+str(trig_54var.get())+' ')
    f.write (str(b54_0var.get())+' '+str(b54_1var.get())+' '+str(b54_2var.get())+' '+str(b54_3var.get())+' '+str(b54_4var.get())+' '+str(b54_5var.get())+' '+str(b54_6var.get())+' ')
    f.write (str(b54_7var.get())+' '+str(b54_8var.get())+' '+str(b54_9var.get())+' '+str(b54_10var.get())+' '+str(b54_11var.get())+' '+str(b54_12var.get())+' '+str(b54_13var.get())+' ')
    f.write (str(b54_14var.get())+' '+str(b54_15var.get())+' '+str(b54_17var.get())+' '+str(trig_55var.get())+' ')
    f.write (str(b55_0var.get())+' '+str(b55_1var.get())+' '+str(b55_2var.get())+' '+str(b55_3var.get())+' '+str(b55_4var.get())+' '+str(b55_5var.get())+' '+str(b55_6var.get())+' ')
    f.write (str(b55_7var.get())+' '+str(b55_8var.get())+' '+str(b55_9var.get())+' '+str(b55_10var.get())+' '+str(b55_11var.get())+' '+str(b55_12var.get())+' '+str(b55_13var.get())+' ')
    f.write (str(b55_14var.get())+' '+str(b55_15var.get())+' '+str(b55_17var.get())+' '+str(trig_56var.get())+' ')
    f.write (str(b56_0var.get())+' '+str(b56_1var.get())+' '+str(b56_2var.get())+' '+str(b56_3var.get())+' '+str(b56_4var.get())+' '+str(b56_5var.get())+' '+str(b56_6var.get())+' ')
    f.write (str(b56_7var.get())+' '+str(b56_8var.get())+' '+str(b56_9var.get())+' '+str(b56_10var.get())+' '+str(b56_11var.get())+' '+str(b56_12var.get())+' '+str(b56_13var.get())+' ')
    f.write (str(b56_14var.get())+' '+str(b56_15var.get())+' '+str(b56_17var.get())+' '+str(trig_57var.get())+' ')
    f.write (str(b57_0var.get())+' '+str(b57_1var.get())+' '+str(b57_2var.get())+' '+str(b57_3var.get())+' '+str(b57_4var.get())+' '+str(b57_5var.get())+' '+str(b57_6var.get())+' ')
    f.write (str(b57_7var.get())+' '+str(b57_8var.get())+' '+str(b57_9var.get())+' '+str(b57_10var.get())+' '+str(b57_11var.get())+' '+str(b57_12var.get())+' '+str(b57_13var.get())+' ')
    f.write (str(b57_14var.get())+' '+str(b57_15var.get())+' '+str(b57_17var.get())+' '+str(trig_58var.get())+' ')
    f.write (str(b58_0var.get())+' '+str(b58_1var.get())+' '+str(b58_2var.get())+' '+str(b58_3var.get())+' '+str(b58_4var.get())+' '+str(b58_5var.get())+' '+str(b58_6var.get())+' ')
    f.write (str(b58_7var.get())+' '+str(b58_8var.get())+' '+str(b58_9var.get())+' '+str(b58_10var.get())+' '+str(b58_11var.get())+' '+str(b58_12var.get())+' '+str(b58_13var.get())+' ')
    f.write (str(b58_14var.get())+' '+str(b58_15var.get())+' '+str(b58_17var.get())+' '+str(trig_59var.get())+' ')
    f.write (str(b59_0var.get())+' '+str(b59_1var.get())+' '+str(b59_2var.get())+' '+str(b59_3var.get())+' '+str(b59_4var.get())+' '+str(b59_5var.get())+' '+str(b59_6var.get())+' ')
    f.write (str(b59_7var.get())+' '+str(b59_8var.get())+' '+str(b59_9var.get())+' '+str(b59_10var.get())+' '+str(b59_11var.get())+' '+str(b59_12var.get())+' '+str(b59_13var.get())+' ')
    f.write (str(b59_14var.get())+' '+str(b59_15var.get())+' '+str(b59_17var.get())+' '+str(trig_60var.get())+' ')
    f.write (str(b60_0var.get())+' '+str(b60_1var.get())+' '+str(b60_2var.get())+' '+str(b60_3var.get())+' '+str(b60_4var.get())+' '+str(b60_5var.get())+' '+str(b60_6var.get())+' ')
    f.write (str(b60_7var.get())+' '+str(b60_8var.get())+' '+str(b60_9var.get())+' '+str(b60_10var.get())+' '+str(b60_11var.get())+' '+str(b60_12var.get())+' '+str(b60_13var.get())+' ')
    f.write (str(b60_14var.get())+' '+str(b60_15var.get())+' '+str(b60_17var.get())+' '+str(trig_61var.get())+' ')
    f.write (str(b61_0var.get())+' '+str(b61_1var.get())+' '+str(b61_2var.get())+' '+str(b61_3var.get())+' '+str(b61_4var.get())+' '+str(b61_5var.get())+' '+str(b61_6var.get())+' ')
    f.write (str(b61_7var.get())+' '+str(b61_8var.get())+' '+str(b61_9var.get())+' '+str(b61_10var.get())+' '+str(b61_11var.get())+' '+str(b61_12var.get())+' '+str(b61_13var.get())+' ')
    f.write (str(b61_14var.get())+' '+str(b61_15var.get())+' '+str(b61_17var.get())+' '+str(trig_62var.get())+' ')
    f.write (str(b62_0var.get())+' '+str(b62_1var.get())+' '+str(b62_2var.get())+' '+str(b62_3var.get())+' '+str(b62_4var.get())+' '+str(b62_5var.get())+' '+str(b62_6var.get())+' ')
    f.write (str(b62_7var.get())+' '+str(b62_8var.get())+' '+str(b62_9var.get())+' '+str(b62_10var.get())+' '+str(b62_11var.get())+' '+str(b62_12var.get())+' '+str(b62_13var.get())+' ')
    f.write (str(b62_14var.get())+' '+str(b62_15var.get())+' '+str(b62_17var.get())+' '+str(trig_63var.get())+' ')
    f.write (str(b63_0var.get())+' '+str(b63_1var.get())+' '+str(b63_2var.get())+' '+str(b63_3var.get())+' '+str(b63_4var.get())+' '+str(b63_5var.get())+' '+str(b63_6var.get())+' ')
    f.write (str(b63_7var.get())+' '+str(b63_8var.get())+' '+str(b63_9var.get())+' '+str(b63_10var.get())+' '+str(b63_11var.get())+' '+str(b63_12var.get())+' '+str(b63_13var.get())+' ')
    f.write (str(b63_14var.get())+' '+str(b63_15var.get())+' '+str(b63_17var.get())+' '+str(trig_64var.get())+' ')
    f.write (str(b64_0var.get())+' '+str(b64_1var.get())+' '+str(b64_2var.get())+' '+str(b64_3var.get())+' '+str(b64_4var.get())+' '+str(b64_5var.get())+' '+str(b64_6var.get())+' ')
    f.write (str(b64_7var.get())+' '+str(b64_8var.get())+' '+str(b64_9var.get())+' '+str(b64_10var.get())+' '+str(b64_11var.get())+' '+str(b64_12var.get())+' '+str(b64_13var.get())+' ')
    f.write (str(b64_14var.get())+' '+str(b64_15var.get())+' '+str(b64_17var.get())+' '+str(trig_65var.get())+' ')
    f.write (str(b65_0var.get())+' '+str(b65_1var.get())+' '+str(b65_2var.get())+' '+str(b65_3var.get())+' '+str(b65_4var.get())+' '+str(b65_5var.get())+' '+str(b65_6var.get())+' ')
    f.write (str(b65_7var.get())+' '+str(b65_8var.get())+' '+str(b65_9var.get())+' '+str(b65_10var.get())+' '+str(b65_11var.get())+' '+str(b65_12var.get())+' '+str(b65_13var.get())+' ')
    f.write (str(b65_14var.get())+' '+str(b65_15var.get())+' '+str(b65_17var.get())+' '+str(trig_66var.get())+' ')
    f.write (str(b66_0var.get())+' '+str(b66_1var.get())+' '+str(b66_2var.get())+' '+str(b66_3var.get())+' '+str(b66_4var.get())+' '+str(b66_5var.get())+' '+str(b66_6var.get())+' ')
    f.write (str(b66_7var.get())+' '+str(b66_8var.get())+' '+str(b66_9var.get())+' '+str(b66_10var.get())+' '+str(b66_11var.get())+' '+str(b66_12var.get())+' '+str(b66_13var.get())+' ')
    f.write (str(b66_14var.get())+' '+str(b66_15var.get())+' '+str(b66_17var.get())+' '+str(trig_67var.get())+' ')
    f.write (str(b67_0var.get())+' '+str(b67_1var.get())+' '+str(b67_2var.get())+' '+str(b67_3var.get())+' '+str(b67_4var.get())+' '+str(b67_5var.get())+' '+str(b67_6var.get())+' ')
    f.write (str(b67_7var.get())+' '+str(b67_8var.get())+' '+str(b67_9var.get())+' '+str(b67_10var.get())+' '+str(b67_11var.get())+' '+str(b67_12var.get())+' '+str(b67_13var.get())+' ')
    f.write (str(b67_14var.get())+' '+str(b67_15var.get())+' '+str(b67_17var.get())+' '+str(trig_68var.get())+' ')
    f.write (str(b68_0var.get())+' '+str(b68_1var.get())+' '+str(b68_2var.get())+' '+str(b68_3var.get())+' '+str(b68_4var.get())+' '+str(b68_5var.get())+' '+str(b68_6var.get())+' ')
    f.write (str(b68_7var.get())+' '+str(b68_8var.get())+' '+str(b68_9var.get())+' '+str(b68_10var.get())+' '+str(b68_11var.get())+' '+str(b68_12var.get())+' '+str(b68_13var.get())+' ')
    f.write (str(b68_14var.get())+' '+str(b68_15var.get())+' '+str(b68_17var.get())+' '+str(trig_69var.get())+' ')
    f.write (str(b69_0var.get())+' '+str(b69_1var.get())+' '+str(b69_2var.get())+' '+str(b69_3var.get())+' '+str(b69_4var.get())+' '+str(b69_5var.get())+' '+str(b69_6var.get())+' ')
    f.write (str(b69_7var.get())+' '+str(b69_8var.get())+' '+str(b69_9var.get())+' '+str(b69_10var.get())+' '+str(b69_11var.get())+' '+str(b69_12var.get())+' '+str(b69_13var.get())+' ')
    f.write (str(b69_14var.get())+' '+str(b69_15var.get())+' '+str(b69_17var.get())+' '+str(trig_70var.get())+' ')
    f.write (str(b70_0var.get())+' '+str(b70_1var.get())+' '+str(b70_2var.get())+' '+str(b70_3var.get())+' '+str(b70_4var.get())+' '+str(b70_5var.get())+' '+str(b70_6var.get())+' ')
    f.write (str(b70_7var.get())+' '+str(b70_8var.get())+' '+str(b70_9var.get())+' '+str(b70_10var.get())+' '+str(b70_11var.get())+' '+str(b70_12var.get())+' '+str(b70_13var.get())+' ')
    f.write (str(b70_14var.get())+' '+str(b70_15var.get())+' '+str(b70_17var.get())+' '+str(trig_71var.get())+' ')
    f.write (str(b71_0var.get())+' '+str(b71_1var.get())+' '+str(b71_2var.get())+' '+str(b71_3var.get())+' '+str(b71_4var.get())+' '+str(b71_5var.get())+' '+str(b71_6var.get())+' ')
    f.write (str(b71_7var.get())+' '+str(b71_8var.get())+' '+str(b71_9var.get())+' '+str(b71_10var.get())+' '+str(b71_11var.get())+' '+str(b71_12var.get())+' '+str(b71_13var.get())+' ')
    f.write (str(b71_14var.get())+' '+str(b71_15var.get())+' '+str(b71_17var.get())+' '+str(trig_72var.get())+' ')
    f.write (str(b72_0var.get())+' '+str(b72_1var.get())+' '+str(b72_2var.get())+' '+str(b72_3var.get())+' '+str(b72_4var.get())+' '+str(b72_5var.get())+' '+str(b72_6var.get())+' ')
    f.write (str(b72_7var.get())+' '+str(b72_8var.get())+' '+str(b72_9var.get())+' '+str(b72_10var.get())+' '+str(b72_11var.get())+' '+str(b72_12var.get())+' '+str(b72_13var.get())+' ')
    f.write (str(b72_14var.get())+' '+str(b72_15var.get())+' '+str(b72_17var.get())+' '+str(trig_73var.get())+' ')
    f.write (str(b73_0var.get())+' '+str(b73_1var.get())+' '+str(b73_2var.get())+' '+str(b73_3var.get())+' '+str(b73_4var.get())+' '+str(b73_5var.get())+' '+str(b73_6var.get())+' ')
    f.write (str(b73_7var.get())+' '+str(b73_8var.get())+' '+str(b73_9var.get())+' '+str(b73_10var.get())+' '+str(b73_11var.get())+' '+str(b73_12var.get())+' '+str(b73_13var.get())+' ')
    f.write (str(b73_14var.get())+' '+str(b73_15var.get())+' '+str(b73_17var.get())+' '+str(trig_74var.get())+' ')
    f.write (str(b74_0var.get())+' '+str(b74_1var.get())+' '+str(b74_2var.get())+' '+str(b74_3var.get())+' '+str(b74_4var.get())+' '+str(b74_5var.get())+' '+str(b74_6var.get())+' ')
    f.write (str(b74_7var.get())+' '+str(b74_8var.get())+' '+str(b74_9var.get())+' '+str(b74_10var.get())+' '+str(b74_11var.get())+' '+str(b74_12var.get())+' '+str(b74_13var.get())+' ')
    f.write (str(b74_14var.get())+' '+str(b74_15var.get())+' '+str(b74_17var.get())+' '+str(trig_75var.get())+' ')
    f.write (str(b75_0var.get())+' '+str(b75_1var.get())+' '+str(b75_2var.get())+' '+str(b75_3var.get())+' '+str(b75_4var.get())+' '+str(b75_5var.get())+' '+str(b75_6var.get())+' ')
    f.write (str(b75_7var.get())+' '+str(b75_8var.get())+' '+str(b75_9var.get())+' '+str(b75_10var.get())+' '+str(b75_11var.get())+' '+str(b75_12var.get())+' '+str(b75_13var.get())+' ')
    f.write (str(b75_14var.get())+' '+str(b75_15var.get())+' '+str(b75_17var.get())+' '+str(trig_76var.get())+' ')
    f.write (str(b76_0var.get())+' '+str(b76_1var.get())+' '+str(b76_2var.get())+' '+str(b76_3var.get())+' '+str(b76_4var.get())+' '+str(b76_5var.get())+' '+str(b76_6var.get())+' ')
    f.write (str(b76_7var.get())+' '+str(b76_8var.get())+' '+str(b76_9var.get())+' '+str(b76_10var.get())+' '+str(b76_11var.get())+' '+str(b76_12var.get())+' '+str(b76_13var.get())+' ')
    f.write (str(b76_14var.get())+' '+str(b76_15var.get())+' '+str(b76_17var.get())+' '+str(trig_77var.get())+' ')
    f.write (str(b77_0var.get())+' '+str(b77_1var.get())+' '+str(b77_2var.get())+' '+str(b77_3var.get())+' '+str(b77_4var.get())+' '+str(b77_5var.get())+' '+str(b77_6var.get())+' ')
    f.write (str(b77_7var.get())+' '+str(b77_8var.get())+' '+str(b77_9var.get())+' '+str(b77_10var.get())+' '+str(b77_11var.get())+' '+str(b77_12var.get())+' '+str(b77_13var.get())+' ')
    f.write (str(b77_14var.get())+' '+str(b77_15var.get())+' '+str(b77_17var.get())+' '+str(trig_78var.get())+' ')
    f.write (str(b78_0var.get())+' '+str(b78_1var.get())+' '+str(b78_2var.get())+' '+str(b78_3var.get())+' '+str(b78_4var.get())+' '+str(b78_5var.get())+' '+str(b78_6var.get())+' ')
    f.write (str(b78_7var.get())+' '+str(b78_8var.get())+' '+str(b78_9var.get())+' '+str(b78_10var.get())+' '+str(b78_11var.get())+' '+str(b78_12var.get())+' '+str(b78_13var.get())+' ')
    f.write (str(b78_14var.get())+' '+str(b78_15var.get())+' '+str(b78_17var.get())+' '+str(trig_79var.get())+' ')
    f.write (str(b79_0var.get())+' '+str(b79_1var.get())+' '+str(b79_2var.get())+' '+str(b79_3var.get())+' '+str(b79_4var.get())+' '+str(b79_5var.get())+' '+str(b79_6var.get())+' ')
    f.write (str(b79_7var.get())+' '+str(b79_8var.get())+' '+str(b79_9var.get())+' '+str(b79_10var.get())+' '+str(b79_11var.get())+' '+str(b79_12var.get())+' '+str(b79_13var.get())+' ')
    f.write (str(b79_14var.get())+' '+str(b79_15var.get())+' '+str(b79_17var.get())+' '+str(trig_80var.get())+' ')
    f.write (str(b80_0var.get())+' '+str(b80_1var.get())+' '+str(b80_2var.get())+' '+str(b80_3var.get())+' '+str(b80_4var.get())+' '+str(b80_5var.get())+' '+str(b80_6var.get())+' ')
    f.write (str(b80_7var.get())+' '+str(b80_8var.get())+' '+str(b80_9var.get())+' '+str(b80_10var.get())+' '+str(b80_11var.get())+' '+str(b80_12var.get())+' '+str(b80_13var.get())+' ')
    f.write (str(b80_14var.get())+' '+str(b80_15var.get())+' '+str(b80_17var.get())+' '+str(trig_81var.get())+' ')
    f.write (str(b81_0var.get())+' '+str(b81_1var.get())+' '+str(b81_2var.get())+' '+str(b81_3var.get())+' '+str(b81_4var.get())+' '+str(b81_5var.get())+' '+str(b81_6var.get())+' ')
    f.write (str(b81_7var.get())+' '+str(b81_8var.get())+' '+str(b81_9var.get())+' '+str(b81_10var.get())+' '+str(b81_11var.get())+' '+str(b81_12var.get())+' '+str(b81_13var.get())+' ')
    f.write (str(b81_14var.get())+' '+str(b81_15var.get())+' '+str(b81_17var.get())+' '+str(trig_82var.get())+' ')
    f.write (str(b82_0var.get())+' '+str(b82_1var.get())+' '+str(b82_2var.get())+' '+str(b82_3var.get())+' '+str(b82_4var.get())+' '+str(b82_5var.get())+' '+str(b82_6var.get())+' ')
    f.write (str(b82_7var.get())+' '+str(b82_8var.get())+' '+str(b82_9var.get())+' '+str(b82_10var.get())+' '+str(b82_11var.get())+' '+str(b82_12var.get())+' '+str(b82_13var.get())+' ')
    f.write (str(b82_14var.get())+' '+str(b82_15var.get())+' '+str(b82_17var.get())+' '+str(trig_83var.get())+' ')
    f.write (str(b83_0var.get())+' '+str(b83_1var.get())+' '+str(b83_2var.get())+' '+str(b83_3var.get())+' '+str(b83_4var.get())+' '+str(b83_5var.get())+' '+str(b83_6var.get())+' ')
    f.write (str(b83_7var.get())+' '+str(b83_8var.get())+' '+str(b83_9var.get())+' '+str(b83_10var.get())+' '+str(b83_11var.get())+' '+str(b83_12var.get())+' '+str(b83_13var.get())+' ')
    f.write (str(b83_14var.get())+' '+str(b83_15var.get())+' '+str(b83_17var.get())+' '+str(trig_84var.get())+' ')
    f.write (str(b84_0var.get())+' '+str(b84_1var.get())+' '+str(b84_2var.get())+' '+str(b84_3var.get())+' '+str(b84_4var.get())+' '+str(b84_5var.get())+' '+str(b84_6var.get())+' ')
    f.write (str(b84_7var.get())+' '+str(b84_8var.get())+' '+str(b84_9var.get())+' '+str(b84_10var.get())+' '+str(b84_11var.get())+' '+str(b84_12var.get())+' '+str(b84_13var.get())+' ')
    f.write (str(b84_14var.get())+' '+str(b84_15var.get())+' '+str(b84_17var.get())+' '+str(trig_85var.get())+' ')
    f.write (str(b85_0var.get())+' '+str(b85_1var.get())+' '+str(b85_2var.get())+' '+str(b85_3var.get())+' '+str(b85_4var.get())+' '+str(b85_5var.get())+' '+str(b85_6var.get())+' ')
    f.write (str(b85_7var.get())+' '+str(b85_8var.get())+' '+str(b85_9var.get())+' '+str(b85_10var.get())+' '+str(b85_11var.get())+' '+str(b85_12var.get())+' '+str(b85_13var.get())+' ')
    f.write (str(b85_14var.get())+' '+str(b85_15var.get())+' '+str(b85_17var.get())+' '+str(trig_86var.get())+' ')
    f.write (str(b86_0var.get())+' '+str(b86_1var.get())+' '+str(b86_2var.get())+' '+str(b86_3var.get())+' '+str(b86_4var.get())+' '+str(b86_5var.get())+' '+str(b86_6var.get())+' ')
    f.write (str(b86_7var.get())+' '+str(b86_8var.get())+' '+str(b86_9var.get())+' '+str(b86_10var.get())+' '+str(b86_11var.get())+' '+str(b86_12var.get())+' '+str(b86_13var.get())+' ')
    f.write (str(b86_14var.get())+' '+str(b86_15var.get())+' '+str(b86_17var.get())+' '+str(trig_87var.get())+' ')
    f.write (str(b87_0var.get())+' '+str(b87_1var.get())+' '+str(b87_2var.get())+' '+str(b87_3var.get())+' '+str(b87_4var.get())+' '+str(b87_5var.get())+' '+str(b87_6var.get())+' ')
    f.write (str(b87_7var.get())+' '+str(b87_8var.get())+' '+str(b87_9var.get())+' '+str(b87_10var.get())+' '+str(b87_11var.get())+' '+str(b87_12var.get())+' '+str(b87_13var.get())+' ')
    f.write (str(b87_14var.get())+' '+str(b87_15var.get())+' '+str(b87_17var.get())+' '+str(trig_88var.get())+' ')
    f.write (str(b88_0var.get())+' '+str(b88_1var.get())+' '+str(b88_2var.get())+' '+str(b88_3var.get())+' '+str(b88_4var.get())+' '+str(b88_5var.get())+' '+str(b88_6var.get())+' ')
    f.write (str(b88_7var.get())+' '+str(b88_8var.get())+' '+str(b88_9var.get())+' '+str(b88_10var.get())+' '+str(b88_11var.get())+' '+str(b88_12var.get())+' '+str(b88_13var.get())+' ')
    f.write (str(b88_14var.get())+' '+str(b88_15var.get())+' '+str(b88_17var.get())+' '+str(trig_89var.get())+' ')
    f.write (str(b89_0var.get())+' '+str(b89_1var.get())+' '+str(b89_2var.get())+' '+str(b89_3var.get())+' '+str(b89_4var.get())+' '+str(b89_5var.get())+' '+str(b89_6var.get())+' ')
    f.write (str(b89_7var.get())+' '+str(b89_8var.get())+' '+str(b89_9var.get())+' '+str(b89_10var.get())+' '+str(b89_11var.get())+' '+str(b89_12var.get())+' '+str(b89_13var.get())+' ')
    f.write (str(b89_14var.get())+' '+str(b89_15var.get())+' '+str(b89_17var.get())+' '+str(trig_90var.get())+' ')
    f.write (str(b90_0var.get())+' '+str(b90_1var.get())+' '+str(b90_2var.get())+' '+str(b90_3var.get())+' '+str(b90_4var.get())+' '+str(b90_5var.get())+' '+str(b90_6var.get())+' ')
    f.write (str(b90_7var.get())+' '+str(b90_8var.get())+' '+str(b90_9var.get())+' '+str(b90_10var.get())+' '+str(b90_11var.get())+' '+str(b90_12var.get())+' '+str(b90_13var.get())+' ')
    f.write (str(b90_14var.get())+' '+str(b90_15var.get())+' '+str(b90_17var.get())+' '+str(trig_91var.get())+' ')
    f.write (str(b91_0var.get())+' '+str(b91_1var.get())+' '+str(b91_2var.get())+' '+str(b91_3var.get())+' '+str(b91_4var.get())+' '+str(b91_5var.get())+' '+str(b91_6var.get())+' ')
    f.write (str(b91_7var.get())+' '+str(b91_8var.get())+' '+str(b91_9var.get())+' '+str(b91_10var.get())+' '+str(b91_11var.get())+' '+str(b91_12var.get())+' '+str(b91_13var.get())+' ')
    f.write (str(b91_14var.get())+' '+str(b91_15var.get())+' '+str(b91_17var.get())+' '+str(trig_92var.get())+' ')
    f.write (str(b92_0var.get())+' '+str(b92_1var.get())+' '+str(b92_2var.get())+' '+str(b92_3var.get())+' '+str(b92_4var.get())+' '+str(b92_5var.get())+' '+str(b92_6var.get())+' ')
    f.write (str(b92_7var.get())+' '+str(b92_8var.get())+' '+str(b92_9var.get())+' '+str(b92_10var.get())+' '+str(b92_11var.get())+' '+str(b92_12var.get())+' '+str(b92_13var.get())+' ')
    f.write (str(b92_14var.get())+' '+str(b92_15var.get())+' '+str(b92_17var.get())+' '+str(trig_93var.get())+' ')
    f.write (str(b93_0var.get())+' '+str(b93_1var.get())+' '+str(b93_2var.get())+' '+str(b93_3var.get())+' '+str(b93_4var.get())+' '+str(b93_5var.get())+' '+str(b93_6var.get())+' ')
    f.write (str(b93_7var.get())+' '+str(b93_8var.get())+' '+str(b93_9var.get())+' '+str(b93_10var.get())+' '+str(b93_11var.get())+' '+str(b93_12var.get())+' '+str(b93_13var.get())+' ')
    f.write (str(b93_14var.get())+' '+str(b93_15var.get())+' '+str(b93_17var.get())+' '+str(trig_94var.get())+' ')
    f.write (str(b94_0var.get())+' '+str(b94_1var.get())+' '+str(b94_2var.get())+' '+str(b94_3var.get())+' '+str(b94_4var.get())+' '+str(b94_5var.get())+' '+str(b94_6var.get())+' ')
    f.write (str(b94_7var.get())+' '+str(b94_8var.get())+' '+str(b94_9var.get())+' '+str(b94_10var.get())+' '+str(b94_11var.get())+' '+str(b94_12var.get())+' '+str(b94_13var.get())+' ')
    f.write (str(b94_14var.get())+' '+str(b94_15var.get())+' '+str(b94_17var.get())+' '+str(trig_95var.get())+' ')
    f.write (str(b95_0var.get())+' '+str(b95_1var.get())+' '+str(b95_2var.get())+' '+str(b95_3var.get())+' '+str(b95_4var.get())+' '+str(b95_5var.get())+' '+str(b95_6var.get())+' ')
    f.write (str(b95_7var.get())+' '+str(b95_8var.get())+' '+str(b95_9var.get())+' '+str(b95_10var.get())+' '+str(b95_11var.get())+' '+str(b95_12var.get())+' '+str(b95_13var.get())+' ')
    f.write (str(b95_14var.get())+' '+str(b95_15var.get())+' '+str(b95_17var.get())+' '+str(trig_96var.get())+' ')
    f.write (str(b96_0var.get())+' '+str(b96_1var.get())+' '+str(b96_2var.get())+' '+str(b96_3var.get())+' '+str(b96_4var.get())+' '+str(b96_5var.get())+' '+str(b96_6var.get())+' ')
    f.write (str(b96_7var.get())+' '+str(b96_8var.get())+' '+str(b96_9var.get())+' '+str(b96_10var.get())+' '+str(b96_11var.get())+' '+str(b96_12var.get())+' '+str(b96_13var.get())+' ')
    f.write (str(b96_14var.get())+' '+str(b96_15var.get())+' '+str(b96_17var.get())+' '+str(trig_97var.get())+' ')
    f.write (str(b97_0var.get())+' '+str(b97_1var.get())+' '+str(b97_2var.get())+' '+str(b97_3var.get())+' '+str(b97_4var.get())+' '+str(b97_5var.get())+' '+str(b97_6var.get())+' ')
    f.write (str(b97_7var.get())+' '+str(b97_8var.get())+' '+str(b97_9var.get())+' '+str(b97_10var.get())+' '+str(b97_11var.get())+' '+str(b97_12var.get())+' '+str(b97_13var.get())+' ')
    f.write (str(b97_14var.get())+' '+str(b97_15var.get())+' '+str(b97_17var.get())+' '+str(trig_98var.get())+' ')
    f.write (str(b98_0var.get())+' '+str(b98_1var.get())+' '+str(b98_2var.get())+' '+str(b98_3var.get())+' '+str(b98_4var.get())+' '+str(b98_5var.get())+' '+str(b98_6var.get())+' ')
    f.write (str(b98_7var.get())+' '+str(b98_8var.get())+' '+str(b98_9var.get())+' '+str(b98_10var.get())+' '+str(b98_11var.get())+' '+str(b98_12var.get())+' '+str(b98_13var.get())+' ')
    f.write (str(b98_14var.get())+' '+str(b98_15var.get())+' '+str(b98_17var.get())+' '+str(trig_99var.get())+' ')
    f.write (str(b99_0var.get())+' '+str(b99_1var.get())+' '+str(b99_2var.get())+' '+str(b99_3var.get())+' '+str(b99_4var.get())+' '+str(b99_5var.get())+' '+str(b99_6var.get())+' ')
    f.write (str(b99_7var.get())+' '+str(b99_8var.get())+' '+str(b99_9var.get())+' '+str(b99_10var.get())+' '+str(b99_11var.get())+' '+str(b99_12var.get())+' '+str(b99_13var.get())+' ')
    f.write (str(b99_14var.get())+' '+str(b99_15var.get())+' '+str(b99_17var.get())+' '+str(trig_100var.get())+' ')
    f.write (str(loop_var.get())+' '+str(speed0)+' '+str(speed1)+' '+str(speed2)+' '+str(speed3)+' '+str(speed4)+' '+str(speed5)+' '+str(speed6)+' '+str(speed7)+' ')
    f.write (str(speed8)+' '+str(speed9)+' '+str(speed10)+' '+str(speed11)+' '+str(speed12)+' '+str(speed13)+' '+str(speed14)+' '+str(speed15)+' ')
    f.write (str(speed16)+' '+str(speed17)+' '+str(speed18)+' '+str(speed19)+' '+str(speed20)+' '+str(speed21)+' '+str(speed22)+' '+str(speed23)+' ')
    f.write (str(speed24)+' '+str(speed25)+' '+str(speed26)+' '+str(speed27)+' '+str(speed28)+' '+str(speed29)+' '+str(speed30)+' '+str(speed31)+' ')
    f.write (str(speed32)+' '+str(speed33)+' '+str(speed34)+' '+str(speed35)+' '+str(speed36)+' '+str(speed37)+' '+str(speed38)+' '+str(speed39)+' ')
    f.write (str(speed40)+' '+str(speed41)+' '+str(speed42)+' '+str(speed43)+' '+str(speed44)+' '+str(speed45)+' '+str(speed46)+' '+str(speed47)+' ')
    f.write (str(speed48)+' '+str(speed49)+' '+str(speed50)+' '+str(speed51)+' '+str(speed52)+' '+str(speed53)+' '+str(speed54)+' '+str(speed55)+' ')
    f.write (str(speed56)+' '+str(speed57)+' '+str(speed58)+' '+str(speed59)+' '+str(speed60)+' '+str(speed61)+' '+str(speed62)+' '+str(speed63)+' ')
    f.write (str(speed64)+' '+str(speed65)+' '+str(speed66)+' '+str(speed67)+' '+str(speed68)+' '+str(speed69)+' '+str(speed70)+' '+str(speed71)+' ')
    f.write (str(speed72)+' '+str(speed73)+' '+str(speed74)+' '+str(speed75)+' '+str(speed76)+' '+str(speed77)+' '+str(speed78)+' '+str(speed79)+' ')
    f.write (str(speed80)+' '+str(speed81)+' '+str(speed82)+' '+str(speed83)+' '+str(speed84)+' '+str(speed85)+' '+str(speed86)+' '+str(speed87)+' ')
    f.write (str(speed88)+' '+str(speed89)+' '+str(speed90)+' '+str(speed91)+' '+str(speed92)+' '+str(speed93)+' '+str(speed94)+' '+str(speed95)+' ')
    f.write (str(speed96)+' '+str(speed97)+' '+str(speed98)+' '+str(speed99)+' ')
    f.write (str(repeat)+' '+str(loop))
    f.close()


class AutoScrollbar(Scrollbar):

    def set(self, lo, hi):
        if float(lo) <= 0.0 and float(hi) >= 1.0:
            self.tk.call("grid", "remove", self)
        else:
            self.grid()
        Scrollbar.set(self, lo, hi)
    def pack(self, **kw):
        raise TclError("cannot use pack with this widget")
    def place(self, **kw):
        raise TclError("cannot use place with this widget")


root = Tk()

vscrollbar = AutoScrollbar(root)
vscrollbar.grid(row=0, column=1, sticky=N+S)
hscrollbar = AutoScrollbar(root, orient=HORIZONTAL)
hscrollbar.grid(row=1, column=0, sticky=E+W)

canvas = Canvas(root, yscrollcommand=vscrollbar.set, xscrollcommand=hscrollbar.set)
canvas.grid(row=0, column=0, sticky=N+S+E+W)

vscrollbar.config(command=canvas.yview)
hscrollbar.config(command=canvas.xview)

# make the canvas expandable
root.grid_rowconfigure(0, weight=1)
root.grid_columnconfigure(0, weight=1)


# create canvas contents
content = Frame(canvas)
content.rowconfigure(1, weight=1)
content.columnconfigure(1, weight=1)


#for displaying speed
show_speed0 = StringVar()
show_speed0.set('0.5')
show_speed1 = StringVar()
show_speed1.set('0.5')
show_speed2 = StringVar()
show_speed2.set('0.5')
show_speed3 = StringVar()
show_speed3.set('0.5')
show_speed4 = StringVar()
show_speed4.set('0.5')
show_speed5 = StringVar()
show_speed5.set('0.5')
show_speed6 = StringVar()
show_speed6.set('0.5')
show_speed7 = StringVar()
show_speed7.set('0.5')
show_speed8 = StringVar()
show_speed8.set('0.5')
show_speed9 = StringVar()
show_speed9.set('0.5')
show_speed10 = StringVar()
show_speed10.set('0.5')
show_speed11 = StringVar()
show_speed11.set('0.5')
show_speed12 = StringVar()
show_speed12.set('0.5')
show_speed13 = StringVar()
show_speed13.set('0.5')
show_speed14 = StringVar()
show_speed14.set('0.5')
show_speed15 = StringVar()
show_speed15.set('0.5')
show_speed16 = StringVar()
show_speed16.set('0.5')
show_speed17 = StringVar()
show_speed17.set('0.5')
show_speed18 = StringVar()
show_speed18.set('0.5')
show_speed19 = StringVar()
show_speed19.set('0.5')
show_speed20 = StringVar()
show_speed20.set('0.5')
show_speed21 = StringVar()
show_speed21.set('0.5')
show_speed22 = StringVar()
show_speed22.set('0.5')
show_speed23 = StringVar()
show_speed23.set('0.5')
show_speed24 = StringVar()
show_speed24.set('0.5')
show_speed25 = StringVar()
show_speed25.set('0.5')
show_speed26 = StringVar()
show_speed26.set('0.5')
show_speed27 = StringVar()
show_speed27.set('0.5')
show_speed28 = StringVar()
show_speed28.set('0.5')
show_speed29 = StringVar()
show_speed29.set('0.5')
show_speed30 = StringVar()
show_speed30.set('0.5')
show_speed31 = StringVar()
show_speed31.set('0.5')
show_speed32 = StringVar()
show_speed32.set('0.5')
show_speed33 = StringVar()
show_speed33.set('0.5')
show_speed34 = StringVar()
show_speed34.set('0.5')
show_speed35 = StringVar()
show_speed35.set('0.5')
show_speed36 = StringVar()
show_speed36.set('0.5')
show_speed37 = StringVar()
show_speed37.set('0.5')
show_speed38 = StringVar()
show_speed38.set('0.5')
show_speed39 = StringVar()
show_speed39.set('0.5')
show_speed40 = StringVar()
show_speed40.set('0.5')
show_speed41 = StringVar()
show_speed41.set('0.5')
show_speed42 = StringVar()
show_speed42.set('0.5')
show_speed43 = StringVar()
show_speed43.set('0.5')
show_speed44 = StringVar()
show_speed44.set('0.5')
show_speed45 = StringVar()
show_speed45.set('0.5')
show_speed46 = StringVar()
show_speed46.set('0.5')
show_speed47 = StringVar()
show_speed47.set('0.5')
show_speed48 = StringVar()
show_speed48.set('0.5')
show_speed49 = StringVar()
show_speed49.set('0.5')
show_speed50 = StringVar()
show_speed50.set('0.5')
show_speed51 = StringVar()
show_speed51.set('0.5')
show_speed52 = StringVar()
show_speed52.set('0.5')
show_speed53 = StringVar()
show_speed53.set('0.5')
show_speed54 = StringVar()
show_speed54.set('0.5')
show_speed55 = StringVar()
show_speed55.set('0.5')
show_speed56 = StringVar()
show_speed56.set('0.5')
show_speed57 = StringVar()
show_speed57.set('0.5')
show_speed58 = StringVar()
show_speed58.set('0.5')
show_speed59 = StringVar()
show_speed59.set('0.5')
show_speed60 = StringVar()
show_speed60.set('0.5')
show_speed61 = StringVar()
show_speed61.set('0.5')
show_speed62 = StringVar()
show_speed62.set('0.5')
show_speed63 = StringVar()
show_speed63.set('0.5')
show_speed64 = StringVar()
show_speed64.set('0.5')
show_speed65 = StringVar()
show_speed65.set('0.5')
show_speed66 = StringVar()
show_speed66.set('0.5')
show_speed67 = StringVar()
show_speed67.set('0.5')
show_speed68 = StringVar()
show_speed68.set('0.5')
show_speed69 = StringVar()
show_speed69.set('0.5')
show_speed70 = StringVar()
show_speed70.set('0.5')
show_speed71 = StringVar()
show_speed71.set('0.5')
show_speed72 = StringVar()
show_speed72.set('0.5')
show_speed73 = StringVar()
show_speed73.set('0.5')
show_speed74 = StringVar()
show_speed74.set('0.5')
show_speed75 = StringVar()
show_speed75.set('0.5')
show_speed76 = StringVar()
show_speed76.set('0.5')
show_speed77 = StringVar()
show_speed77.set('0.5')
show_speed78 = StringVar()
show_speed78.set('0.5')
show_speed79 = StringVar()
show_speed79.set('0.5')
show_speed80 = StringVar()
show_speed80.set('0.5')
show_speed81 = StringVar()
show_speed81.set('0.5')
show_speed82 = StringVar()
show_speed82.set('0.5')
show_speed83 = StringVar()
show_speed83.set('0.5')
show_speed84 = StringVar()
show_speed84.set('0.5')
show_speed85 = StringVar()
show_speed85.set('0.5')
show_speed86 = StringVar()
show_speed86.set('0.5')
show_speed87 = StringVar()
show_speed87.set('0.5')
show_speed88 = StringVar()
show_speed88.set('0.5')
show_speed89 = StringVar()
show_speed89.set('0.5')
show_speed90 = StringVar()
show_speed90.set('0.5')
show_speed91 = StringVar()
show_speed91.set('0.5')
show_speed92 = StringVar()
show_speed92.set('0.5')
show_speed93 = StringVar()
show_speed93.set('0.5')
show_speed94 = StringVar()
show_speed94.set('0.5')
show_speed95 = StringVar()
show_speed95.set('0.5')
show_speed96 = StringVar()
show_speed96.set('0.5')
show_speed97 = StringVar()
show_speed97.set('0.5')
show_speed98 = StringVar()
show_speed98.set('0.5')
show_speed99 = StringVar()
show_speed99.set('0.5')

#for displaying repeat time
show_repeat = StringVar()
show_repeat.set('0.5')

# for showing number of loops
show_loop = StringVar()
show_loop.set('1')

#for Beat colour change
global c1
c1 = StringVar()


#defining stop box
stop_var = IntVar()
stop_var.set(0)
stop_0 = ttk.Checkbutton(content, text="STOP", variable=stop_var, onvalue=1, offvalue=0)
#stop_0.grid(column=27,row=12)

#defining loop box
loop_var = IntVar()
loop_var.set(0)
loop_0 = ttk.Checkbutton(content, command=toggle_inf, text="LOOP ON/OFF", variable=loop_var, onvalue=1, offvalue=0)
loop_0.grid(column=38,row=3)


# Group 1

# defining labels
nameb0_0 = ttk.Label(content, text="Beat 01", background=c1.get())
nameb1_0 = ttk.Label(content, text="Beat 02", background=c1.get())
nameb2_0 = ttk.Label(content, text="Beat 03", background=c1.get())
nameb3_0 = ttk.Label(content, text="Beat 04", background=c1.get())

# Defining number type
b0_0var = IntVar()
b0_1var = IntVar()
b0_2var = IntVar()
b0_3var = IntVar()
b0_4var = IntVar()
b0_5var = IntVar()
b0_6var = IntVar()
b0_7var = IntVar()
b0_8var = IntVar()
b0_9var = IntVar()
b0_10var = IntVar()
b0_11var = IntVar()
b0_12var = IntVar()
b0_13var = IntVar()
b0_14var = IntVar()
b0_15var = IntVar()
b0_16var = IntVar()
b0_17var = IntVar()
trig_1var =IntVar()

b1_0var = IntVar()
b1_1var = IntVar()
b1_2var = IntVar()
b1_3var = IntVar()
b1_4var = IntVar()
b1_5var = IntVar()
b1_6var = IntVar()
b1_7var = IntVar()
b1_8var = IntVar()
b1_9var = IntVar()
b1_10var = IntVar()
b1_11var = IntVar()
b1_12var = IntVar()
b1_13var = IntVar()
b1_14var = IntVar()
b1_15var = IntVar()
b1_17var = IntVar()
trig_2var =IntVar()

b2_0var = IntVar()
b2_1var = IntVar()
b2_2var = IntVar()
b2_3var = IntVar()
b2_4var = IntVar()
b2_5var = IntVar()
b2_6var = IntVar()
b2_7var = IntVar()
b2_8var = IntVar()
b2_9var = IntVar()
b2_10var = IntVar()
b2_11var = IntVar()
b2_12var = IntVar()
b2_13var = IntVar()
b2_14var = IntVar()
b2_15var = IntVar()
b2_17var = IntVar()
trig_3var =IntVar()

b3_0var = IntVar()
b3_1var = IntVar()
b3_2var = IntVar()
b3_3var = IntVar()
b3_4var = IntVar()
b3_5var = IntVar()
b3_6var = IntVar()
b3_7var = IntVar()
b3_8var = IntVar()
b3_9var = IntVar()
b3_10var = IntVar()
b3_11var = IntVar()
b3_12var = IntVar()
b3_13var = IntVar()
b3_14var = IntVar()
b3_15var = IntVar()
b3_17var = IntVar()
b3_17var = IntVar()
trig_4var =IntVar()

# setting default button position
b0_0var.set(0)
b0_1var.set(0)
b0_2var.set(0)
b0_3var.set(0)
b0_4var.set(0)
b0_5var.set(0)
b0_6var.set(0)
b0_7var.set(0)
b0_8var.set(0)
b0_9var.set(0)
b0_10var.set(0)
b0_11var.set(0)
b0_12var.set(0)
b0_13var.set(0)
b0_14var.set(0)
b0_15var.set(0)
b0_16var.set(0)
b0_17var.set(0)
trig_1var.set(0)

b1_0var.set(0)
b1_1var.set(0)
b1_2var.set(0)
b1_3var.set(0)
b1_4var.set(0)
b1_5var.set(0)
b1_6var.set(0)
b1_7var.set(0)
b1_8var.set(0)
b1_9var.set(0)
b1_10var.set(0)
b1_11var.set(0)
b1_12var.set(0)
b1_13var.set(0)
b1_14var.set(0)
b1_15var.set(0)
b1_17var.set(0)
trig_2var.set(0)

b2_0var.set(0)
b2_1var.set(0)
b2_2var.set(0)
b2_3var.set(0)
b2_4var.set(0)
b2_5var.set(0)
b2_6var.set(0)
b2_7var.set(0)
b2_8var.set(0)
b2_9var.set(0)
b2_10var.set(0)
b2_11var.set(0)
b2_12var.set(0)
b2_13var.set(0)
b2_14var.set(0)
b2_15var.set(0)
b2_17var.set(0)
trig_3var.set(0)

b3_0var.set(0)
b3_1var.set(0)
b3_2var.set(0)
b3_3var.set(0)
b3_4var.set(0)
b3_5var.set(0)
b3_6var.set(0)
b3_7var.set(0)
b3_8var.set(0)
b3_9var.set(0)
b3_10var.set(0)
b3_11var.set(0)
b3_12var.set(0)
b3_13var.set(0)
b3_14var.set(0)
b3_15var.set(0)
b3_17var.set(0)
trig_4var.set(0)

# defining button

b0_0 = ttk.Checkbutton(content, variable=b0_0var, onvalue=1, offvalue=0)
b0_1 = ttk.Checkbutton(content, variable=b0_1var, onvalue=1, offvalue=0)
b0_2 = ttk.Checkbutton(content, variable=b0_2var, onvalue=1, offvalue=0)
b0_3 = ttk.Checkbutton(content, variable=b0_3var, onvalue=1, offvalue=0)
b0_4 = ttk.Checkbutton(content, variable=b0_4var, onvalue=1, offvalue=0)
b0_5 = ttk.Checkbutton(content, variable=b0_5var, onvalue=1, offvalue=0)
b0_6 = ttk.Checkbutton(content, variable=b0_6var, onvalue=1, offvalue=0)
b0_7 = ttk.Checkbutton(content, variable=b0_7var, onvalue=1, offvalue=0)
b0_8 = ttk.Checkbutton(content, variable=b0_8var, onvalue=1, offvalue=0)
b0_9 = ttk.Checkbutton(content, variable=b0_9var, onvalue=1, offvalue=0)
b0_10 = ttk.Checkbutton(content, variable=b0_10var, onvalue=1, offvalue=0)
b0_11 = ttk.Checkbutton(content, variable=b0_11var, onvalue=1, offvalue=0)
b0_12 = ttk.Checkbutton(content, variable=b0_12var, onvalue=1, offvalue=0)
b0_13 = ttk.Checkbutton(content, variable=b0_13var, onvalue=1, offvalue=0)
b0_14 = ttk.Checkbutton(content, variable=b0_14var, onvalue=1, offvalue=0)
b0_15 = ttk.Checkbutton(content, variable=b0_15var, onvalue=1, offvalue=0)
b0_16 = ttk.Checkbutton(content, command=toggle_loop, text="INFINITE LOOP ON/OFF", variable=b0_16var, onvalue=1, offvalue=0)
b0_17 = ttk.Checkbutton(content, text="HALT", variable=b0_17var, onvalue=1, offvalue=0)
trig_1 = ttk.Checkbutton(content, variable=trig_1var, onvalue=1, offvalue=0)

b1_0 = ttk.Checkbutton(content, variable=b1_0var, onvalue=1, offvalue=0)
b1_1 = ttk.Checkbutton(content, variable=b1_1var, onvalue=1, offvalue=0)
b1_2 = ttk.Checkbutton(content, variable=b1_2var, onvalue=1, offvalue=0)
b1_3 = ttk.Checkbutton(content, variable=b1_3var, onvalue=1, offvalue=0)
b1_4 = ttk.Checkbutton(content, variable=b1_4var, onvalue=1, offvalue=0)
b1_5 = ttk.Checkbutton(content, variable=b1_5var, onvalue=1, offvalue=0)
b1_6 = ttk.Checkbutton(content, variable=b1_6var, onvalue=1, offvalue=0)
b1_7 = ttk.Checkbutton(content, variable=b1_7var, onvalue=1, offvalue=0)
b1_8 = ttk.Checkbutton(content, variable=b1_8var, onvalue=1, offvalue=0)
b1_9 = ttk.Checkbutton(content, variable=b1_9var, onvalue=1, offvalue=0)
b1_10 = ttk.Checkbutton(content, variable=b1_10var, onvalue=1, offvalue=0)
b1_11 = ttk.Checkbutton(content, variable=b1_11var, onvalue=1, offvalue=0)
b1_12 = ttk.Checkbutton(content, variable=b1_12var, onvalue=1, offvalue=0)
b1_13 = ttk.Checkbutton(content, variable=b1_13var, onvalue=1, offvalue=0)
b1_14 = ttk.Checkbutton(content, variable=b1_14var, onvalue=1, offvalue=0)
b1_15 = ttk.Checkbutton(content, variable=b1_15var, onvalue=1, offvalue=0)
b1_17 = ttk.Checkbutton(content, text="HALT", variable=b1_17var, onvalue=1, offvalue=0)
trig_2 = ttk.Checkbutton(content, variable=trig_2var, onvalue=1, offvalue=0)

b2_0 = ttk.Checkbutton(content, variable=b2_0var, onvalue=1, offvalue=0)
b2_1 = ttk.Checkbutton(content, variable=b2_1var, onvalue=1, offvalue=0)
b2_2 = ttk.Checkbutton(content, variable=b2_2var, onvalue=1, offvalue=0)
b2_3 = ttk.Checkbutton(content, variable=b2_3var, onvalue=1, offvalue=0)
b2_4 = ttk.Checkbutton(content, variable=b2_4var, onvalue=1, offvalue=0)
b2_5 = ttk.Checkbutton(content, variable=b2_5var, onvalue=1, offvalue=0)
b2_6 = ttk.Checkbutton(content, variable=b2_6var, onvalue=1, offvalue=0)
b2_7 = ttk.Checkbutton(content, variable=b2_7var, onvalue=1, offvalue=0)
b2_8 = ttk.Checkbutton(content, variable=b2_8var, onvalue=1, offvalue=0)
b2_9 = ttk.Checkbutton(content, variable=b2_9var, onvalue=1, offvalue=0)
b2_10 = ttk.Checkbutton(content, variable=b2_10var, onvalue=1, offvalue=0)
b2_11 = ttk.Checkbutton(content, variable=b2_11var, onvalue=1, offvalue=0)
b2_12 = ttk.Checkbutton(content, variable=b2_12var, onvalue=1, offvalue=0)
b2_13 = ttk.Checkbutton(content, variable=b2_13var, onvalue=1, offvalue=0)
b2_14 = ttk.Checkbutton(content, variable=b2_14var, onvalue=1, offvalue=0)
b2_15 = ttk.Checkbutton(content, variable=b2_15var, onvalue=1, offvalue=0)
b2_17 = ttk.Checkbutton(content, text="HALT", variable=b2_17var, onvalue=1, offvalue=0)
trig_3 = ttk.Checkbutton(content, variable=trig_3var, onvalue=1, offvalue=0)

b3_0 = ttk.Checkbutton(content, variable=b3_0var, onvalue=1, offvalue=0)
b3_1 = ttk.Checkbutton(content, variable=b3_1var, onvalue=1, offvalue=0)
b3_2 = ttk.Checkbutton(content, variable=b3_2var, onvalue=1, offvalue=0)
b3_3 = ttk.Checkbutton(content, variable=b3_3var, onvalue=1, offvalue=0)
b3_4 = ttk.Checkbutton(content, variable=b3_4var, onvalue=1, offvalue=0)
b3_5 = ttk.Checkbutton(content, variable=b3_5var, onvalue=1, offvalue=0)
b3_6 = ttk.Checkbutton(content, variable=b3_6var, onvalue=1, offvalue=0)
b3_7 = ttk.Checkbutton(content, variable=b3_7var, onvalue=1, offvalue=0)
b3_8 = ttk.Checkbutton(content, variable=b3_8var, onvalue=1, offvalue=0)
b3_9 = ttk.Checkbutton(content, variable=b3_9var, onvalue=1, offvalue=0)
b3_10 = ttk.Checkbutton(content, variable=b3_10var, onvalue=1, offvalue=0)
b3_11 = ttk.Checkbutton(content, variable=b3_11var, onvalue=1, offvalue=0)
b3_12 = ttk.Checkbutton(content, variable=b3_12var, onvalue=1, offvalue=0)
b3_13 = ttk.Checkbutton(content, variable=b3_13var, onvalue=1, offvalue=0)
b3_14 = ttk.Checkbutton(content, variable=b3_14var, onvalue=1, offvalue=0)
b3_15 = ttk.Checkbutton(content, variable=b3_15var, onvalue=1, offvalue=0)
b3_17 = ttk.Checkbutton(content, text="HALT", variable=b3_17var, onvalue=1, offvalue=0)
trig_4 = ttk.Checkbutton(content, variable=trig_4var, onvalue=1, offvalue=0)


content.grid(column=0, row=0)

# placing text beside each beat
nameb0_0.grid(column=1, row=2)
nameb1_0.grid(column=1, row=3)
nameb2_0.grid(column=1, row=4)
nameb3_0.grid(column=1, row=5)

space0 = ttk.Label(content, width=6, text='  TOM1').grid(column=2, row=0, columnspan=1)
space1 = ttk.Label(content, width=6, text='  TOM2').grid(column=3, row=0, columnspan=1)
space2 = ttk.Label(content, width=6, text='  TOM3').grid(column=4, row=0, columnspan=1)
space3 = ttk.Label(content, width=6, text='  TOM4').grid(column=5, row=0, columnspan=1)
space4 = ttk.Label(content, width=6, text='  SP05').grid(column=6, row=0, columnspan=1)
space5 = ttk.Label(content, width=6, text='  CYN1').grid(column=7, row=0, columnspan=1)
space6 = ttk.Label(content, width=6, text='  CYN2').grid(column=8, row=0, columnspan=1)
space7 = ttk.Label(content, width=6, text='  CYN3').grid(column=9, row=0, columnspan=1)
space8 = ttk.Label(content, width=6, text='  CYN4').grid(column=10, row=0, columnspan=1)
space9 = ttk.Label(content, width=6, text='  CLP1').grid(column=11, row=0, columnspan=1)
space10 = ttk.Label(content, width=6, text='  SP11').grid(column=12, row=0, columnspan=1)
space11 = ttk.Label(content, width=6, text='  SP12').grid(column=13, row=0, columnspan=1)
space12 = ttk.Label(content, width=6, text='  SP13').grid(column=14, row=0, columnspan=1)
space13 = ttk.Label(content, width=6, text='  SP14').grid(column=15, row=0, columnspan=1)
space14 = ttk.Label(content, width=6, text='  SP15').grid(column=16, row=0, columnspan=1)
space15 = ttk.Label(content, width=6, text='  SP16').grid(column=17, row=0, columnspan=1)
space16 = ttk.Label(content, width=3).grid(column=18, row=0, columnspan=1)
space17 = ttk.Label(content, width=7, text=' REPEAT').grid(column=19, row=0, columnspan=1)
space18 = ttk.Label(content, width=3).grid(column=18, row=0, columnspan=1)
space19 = ttk.Label(content, width=3).grid(column=20, row=0, columnspan=1)
space20 = ttk.Label(content, width=7, text=' TEMPO').grid(column=21, row=0, columnspan=3)
space21 = ttk.Label(content, width=2).grid(column=0, row=0, columnspan=1)
space22 = ttk.Label(content, width=4).grid(column=24, row=0, columnspan=1)
space23 = ttk.Label(content, width=4, text='TRIG').grid(column=25, row=0, columnspan=1)
space24 = ttk.Label(content, width=4).grid(column=26, row=0, columnspan=1)

# placing buttons on grid
b0_0.grid(column=2,row=2)
b0_1.grid(column=3,row=2)
b0_2.grid(column=4,row=2)
b0_3.grid(column=5,row=2)
b0_4.grid(column=6,row=2)
b0_5.grid(column=7,row=2)
b0_6.grid(column=8,row=2)
b0_7.grid(column=9,row=2)
b0_8.grid(column=10,row=2)
b0_9.grid(column=11,row=2)
b0_10.grid(column=12,row=2)
b0_11.grid(column=13,row=2)
b0_12.grid(column=14,row=2)
b0_13.grid(column=15,row=2)
b0_14.grid(column=16,row=2)
b0_15.grid(column=17,row=2)
b0_16.grid(column=38,row=2)
b0_17.grid(column=19,row=2)
trig_1.grid(column=25,row=2)                                          

b1_0.grid(column=2,row=3)
b1_1.grid(column=3,row=3)
b1_2.grid(column=4,row=3)
b1_3.grid(column=5,row=3)
b1_4.grid(column=6,row=3)
b1_5.grid(column=7,row=3)
b1_6.grid(column=8,row=3)
b1_7.grid(column=9,row=3)
b1_8.grid(column=10,row=3)
b1_9.grid(column=11,row=3)
b1_10.grid(column=12,row=3)
b1_11.grid(column=13,row=3)
b1_12.grid(column=14,row=3)
b1_13.grid(column=15,row=3)
b1_14.grid(column=16,row=3)
b1_15.grid(column=17,row=3)
b1_17.grid(column=19,row=3)
trig_2.grid(column=25,row=3)                                          

b2_0.grid(column=2,row=4)
b2_1.grid(column=3,row=4)
b2_2.grid(column=4,row=4)
b2_3.grid(column=5,row=4)
b2_4.grid(column=6,row=4)
b2_5.grid(column=7,row=4)
b2_6.grid(column=8,row=4)
b2_7.grid(column=9,row=4)
b2_8.grid(column=10,row=4)
b2_9.grid(column=11,row=4)
b2_10.grid(column=12,row=4)
b2_11.grid(column=13,row=4)
b2_12.grid(column=14,row=4)
b2_13.grid(column=15,row=4)
b2_14.grid(column=16,row=4)
b2_15.grid(column=17,row=4)
b2_17.grid(column=19,row=4)
trig_3.grid(column=25,row=4)                                          

b3_0.grid(column=2,row=5)
b3_1.grid(column=3,row=5)
b3_2.grid(column=4,row=5)
b3_3.grid(column=5,row=5)
b3_4.grid(column=6,row=5)
b3_5.grid(column=7,row=5)
b3_6.grid(column=8,row=5)
b3_7.grid(column=9,row=5)
b3_8.grid(column=10,row=5)
b3_9.grid(column=11,row=5)
b3_10.grid(column=12,row=5)
b3_11.grid(column=13,row=5)
b3_12.grid(column=14,row=5)
b3_13.grid(column=15,row=5)
b3_14.grid(column=16,row=5)
b3_15.grid(column=17,row=5)
b3_17.grid(column=19,row=5)
trig_4.grid(column=25,row=5)

# Group 2

# defining labels
nameb4_0 = ttk.Label(content, text="Beat 05", background=c1.get())
nameb5_0 = ttk.Label(content, text="Beat 06", background=c1.get())
nameb6_0 = ttk.Label(content, text="Beat 07", background=c1.get())
nameb7_0 = ttk.Label(content, text="Beat 08", background=c1.get())


# Defining number type
b4_0var = IntVar()
b4_1var = IntVar()
b4_2var = IntVar()
b4_3var = IntVar()
b4_4var = IntVar()
b4_5var = IntVar()
b4_6var = IntVar()
b4_7var = IntVar()
b4_8var = IntVar()
b4_9var = IntVar()
b4_10var = IntVar()
b4_11var = IntVar()
b4_12var = IntVar()
b4_13var = IntVar()
b4_14var = IntVar()
b4_15var = IntVar()
b4_17var = IntVar()
trig_5var = IntVar()                                          

b5_0var = IntVar()
b5_1var = IntVar()
b5_2var = IntVar()
b5_3var = IntVar()
b5_4var = IntVar()
b5_5var = IntVar()
b5_6var = IntVar()
b5_7var = IntVar()
b5_8var = IntVar()
b5_9var = IntVar()
b5_10var = IntVar()
b5_11var = IntVar()
b5_12var = IntVar()
b5_13var = IntVar()
b5_14var = IntVar()
b5_15var = IntVar()
b5_17var = IntVar()
trig_6var = IntVar()                                          

b6_0var = IntVar()
b6_1var = IntVar()
b6_2var = IntVar()
b6_3var = IntVar()
b6_4var = IntVar()
b6_5var = IntVar()
b6_6var = IntVar()
b6_7var = IntVar()
b6_8var = IntVar()
b6_9var = IntVar()
b6_10var = IntVar()
b6_11var = IntVar()
b6_12var = IntVar()
b6_13var = IntVar()
b6_14var = IntVar()
b6_15var = IntVar()
b6_17var = IntVar()
trig_7var = IntVar()                                          

b7_0var = IntVar()
b7_1var = IntVar()
b7_2var = IntVar()
b7_3var = IntVar()
b7_4var = IntVar()
b7_5var = IntVar()
b7_6var = IntVar()
b7_7var = IntVar()
b7_8var = IntVar()
b7_9var = IntVar()
b7_10var = IntVar()
b7_11var = IntVar()
b7_12var = IntVar()
b7_13var = IntVar()
b7_14var = IntVar()
b7_15var = IntVar()
b7_17var = IntVar()
trig_8var = IntVar()

# Setting default button position
b4_0var.set(0)
b4_1var.set(0)
b4_2var.set(0)
b4_3var.set(0)
b4_4var.set(0)
b4_5var.set(0)
b4_6var.set(0)
b4_7var.set(0)
b4_8var.set(0)
b4_9var.set(0)
b4_10var.set(0)
b4_11var.set(0)
b4_12var.set(0)
b4_13var.set(0)
b4_14var.set(0)
b4_15var.set(0)
b4_17var.set(0)
trig_5var.set(0)

b5_0var.set(0)
b5_1var.set(0)
b5_2var.set(0)
b5_3var.set(0)
b5_4var.set(0)
b5_5var.set(0)
b5_6var.set(0)
b5_7var.set(0)
b5_8var.set(0)
b5_9var.set(0)
b5_10var.set(0)
b5_11var.set(0)
b5_12var.set(0)
b5_13var.set(0)
b5_14var.set(0)
b5_15var.set(0)
b5_17var.set(0)
trig_6var.set(0)                                          

b6_0var.set(0)
b6_1var.set(0)
b6_2var.set(0)
b6_3var.set(0)
b6_4var.set(0)
b6_5var.set(0)
b6_6var.set(0)
b6_7var.set(0)
b6_8var.set(0)
b6_9var.set(0)
b6_10var.set(0)
b6_11var.set(0)
b6_12var.set(0)
b6_13var.set(0)
b6_14var.set(0)
b6_15var.set(0)
b6_17var.set(0)
trig_7var.set(0)  

b7_0var.set(0)
b7_1var.set(0)
b7_2var.set(0)
b7_3var.set(0)
b7_4var.set(0)
b7_5var.set(0)
b7_6var.set(0)
b7_7var.set(0)
b7_8var.set(0)
b7_9var.set(0)
b7_10var.set(0)
b7_11var.set(0)
b7_12var.set(0)
b7_13var.set(0)
b7_14var.set(0)
b7_15var.set(0)
b7_17var.set(0)
trig_8var.set(0)

# Defining button
b4_0 = ttk.Checkbutton(content, variable=b4_0var, onvalue=1, offvalue=0)
b4_1 = ttk.Checkbutton(content, variable=b4_1var, onvalue=1, offvalue=0)
b4_2 = ttk.Checkbutton(content, variable=b4_2var, onvalue=1, offvalue=0)
b4_3 = ttk.Checkbutton(content, variable=b4_3var, onvalue=1, offvalue=0)
b4_4 = ttk.Checkbutton(content, variable=b4_4var, onvalue=1, offvalue=0)
b4_5 = ttk.Checkbutton(content, variable=b4_5var, onvalue=1, offvalue=0)
b4_6 = ttk.Checkbutton(content, variable=b4_6var, onvalue=1, offvalue=0)
b4_7 = ttk.Checkbutton(content, variable=b4_7var, onvalue=1, offvalue=0)
b4_8 = ttk.Checkbutton(content, variable=b4_8var, onvalue=1, offvalue=0)
b4_9 = ttk.Checkbutton(content, variable=b4_9var, onvalue=1, offvalue=0)
b4_10 = ttk.Checkbutton(content, variable=b4_10var, onvalue=1, offvalue=0)
b4_11 = ttk.Checkbutton(content, variable=b4_11var, onvalue=1, offvalue=0)
b4_12 = ttk.Checkbutton(content, variable=b4_12var, onvalue=1, offvalue=0)
b4_13 = ttk.Checkbutton(content, variable=b4_13var, onvalue=1, offvalue=0)
b4_14 = ttk.Checkbutton(content, variable=b4_14var, onvalue=1, offvalue=0)
b4_15 = ttk.Checkbutton(content, variable=b4_15var, onvalue=1, offvalue=0)
b4_17 = ttk.Checkbutton(content, text="HALT", variable=b4_17var, onvalue=1, offvalue=0)
trig_5 = ttk.Checkbutton(content, variable=trig_5var, onvalue=1, offvalue=0)

b5_0 = ttk.Checkbutton(content, variable=b5_0var, onvalue=1, offvalue=0)
b5_1 = ttk.Checkbutton(content, variable=b5_1var, onvalue=1, offvalue=0)
b5_2 = ttk.Checkbutton(content, variable=b5_2var, onvalue=1, offvalue=0)
b5_3 = ttk.Checkbutton(content, variable=b5_3var, onvalue=1, offvalue=0)
b5_4 = ttk.Checkbutton(content, variable=b5_4var, onvalue=1, offvalue=0)
b5_5 = ttk.Checkbutton(content, variable=b5_5var, onvalue=1, offvalue=0)
b5_6 = ttk.Checkbutton(content, variable=b5_6var, onvalue=1, offvalue=0)
b5_7 = ttk.Checkbutton(content, variable=b5_7var, onvalue=1, offvalue=0)
b5_8 = ttk.Checkbutton(content, variable=b5_8var, onvalue=1, offvalue=0)
b5_9 = ttk.Checkbutton(content, variable=b5_9var, onvalue=1, offvalue=0)
b5_10 = ttk.Checkbutton(content, variable=b5_10var, onvalue=1, offvalue=0)
b5_11 = ttk.Checkbutton(content, variable=b5_11var, onvalue=1, offvalue=0)
b5_12 = ttk.Checkbutton(content, variable=b5_12var, onvalue=1, offvalue=0)
b5_13 = ttk.Checkbutton(content, variable=b5_13var, onvalue=1, offvalue=0)
b5_14 = ttk.Checkbutton(content, variable=b5_14var, onvalue=1, offvalue=0)
b5_15 = ttk.Checkbutton(content, variable=b5_15var, onvalue=1, offvalue=0)
b5_17 = ttk.Checkbutton(content, text="HALT", variable=b5_17var, onvalue=1, offvalue=0)
trig_6 = ttk.Checkbutton(content, variable=trig_6var, onvalue=1, offvalue=0)

b6_0 = ttk.Checkbutton(content, variable=b6_0var, onvalue=1, offvalue=0)
b6_1 = ttk.Checkbutton(content, variable=b6_1var, onvalue=1, offvalue=0)
b6_2 = ttk.Checkbutton(content, variable=b6_2var, onvalue=1, offvalue=0)
b6_3 = ttk.Checkbutton(content, variable=b6_3var, onvalue=1, offvalue=0)
b6_4 = ttk.Checkbutton(content, variable=b6_4var, onvalue=1, offvalue=0)
b6_5 = ttk.Checkbutton(content, variable=b6_5var, onvalue=1, offvalue=0)
b6_6 = ttk.Checkbutton(content, variable=b6_6var, onvalue=1, offvalue=0)
b6_7 = ttk.Checkbutton(content, variable=b6_7var, onvalue=1, offvalue=0)
b6_8 = ttk.Checkbutton(content, variable=b6_8var, onvalue=1, offvalue=0)
b6_9 = ttk.Checkbutton(content, variable=b6_9var, onvalue=1, offvalue=0)
b6_10 = ttk.Checkbutton(content, variable=b6_10var, onvalue=1, offvalue=0)
b6_11 = ttk.Checkbutton(content, variable=b6_11var, onvalue=1, offvalue=0)
b6_12 = ttk.Checkbutton(content, variable=b6_12var, onvalue=1, offvalue=0)
b6_13 = ttk.Checkbutton(content, variable=b6_13var, onvalue=1, offvalue=0)
b6_14 = ttk.Checkbutton(content, variable=b6_14var, onvalue=1, offvalue=0)
b6_15 = ttk.Checkbutton(content, variable=b6_15var, onvalue=1, offvalue=0)
b6_17 = ttk.Checkbutton(content, text="HALT", variable=b6_17var, onvalue=1, offvalue=0)
trig_7 = ttk.Checkbutton(content, variable=trig_7var, onvalue=1, offvalue=0)  

b7_0 = ttk.Checkbutton(content, variable=b7_0var, onvalue=1, offvalue=0)
b7_1 = ttk.Checkbutton(content, variable=b7_1var, onvalue=1, offvalue=0)
b7_2 = ttk.Checkbutton(content, variable=b7_2var, onvalue=1, offvalue=0)
b7_3 = ttk.Checkbutton(content, variable=b7_3var, onvalue=1, offvalue=0)
b7_4 = ttk.Checkbutton(content, variable=b7_4var, onvalue=1, offvalue=0)
b7_5 = ttk.Checkbutton(content, variable=b7_5var, onvalue=1, offvalue=0)
b7_6 = ttk.Checkbutton(content, variable=b7_6var, onvalue=1, offvalue=0)
b7_7 = ttk.Checkbutton(content, variable=b7_7var, onvalue=1, offvalue=0)
b7_8 = ttk.Checkbutton(content, variable=b7_8var, onvalue=1, offvalue=0)
b7_9 = ttk.Checkbutton(content, variable=b7_9var, onvalue=1, offvalue=0)
b7_10 = ttk.Checkbutton(content, variable=b7_10var, onvalue=1, offvalue=0)
b7_11 = ttk.Checkbutton(content, variable=b7_11var, onvalue=1, offvalue=0)
b7_12 = ttk.Checkbutton(content, variable=b7_12var, onvalue=1, offvalue=0)
b7_13 = ttk.Checkbutton(content, variable=b7_13var, onvalue=1, offvalue=0)
b7_14 = ttk.Checkbutton(content, variable=b7_14var, onvalue=1, offvalue=0)
b7_15 = ttk.Checkbutton(content, variable=b7_15var, onvalue=1, offvalue=0)
b7_17 = ttk.Checkbutton(content, text="HALT", variable=b7_17var, onvalue=1, offvalue=0)
trig_8 = ttk.Checkbutton(content, variable=trig_8var, onvalue=1, offvalue=0)


# Placing text beside each beat
nameb4_0.grid(column=1, row=6)
nameb5_0.grid(column=1, row=7)
nameb6_0.grid(column=1, row=8)
nameb7_0.grid(column=1, row=9)

# Placing buttons on grid
b4_0.grid(column=2,row=6)
b4_1.grid(column=3,row=6)
b4_2.grid(column=4,row=6)
b4_3.grid(column=5,row=6)
b4_4.grid(column=6,row=6)
b4_5.grid(column=7,row=6)
b4_6.grid(column=8,row=6)
b4_7.grid(column=9,row=6)
b4_8.grid(column=10,row=6)
b4_9.grid(column=11,row=6)
b4_10.grid(column=12,row=6)
b4_11.grid(column=13,row=6)
b4_12.grid(column=14,row=6)
b4_13.grid(column=15,row=6)
b4_14.grid(column=16,row=6)
b4_15.grid(column=17,row=6)
b4_17.grid(column=19,row=6)
trig_5.grid(column=25,row=6)

b5_0.grid(column=2,row=7)
b5_1.grid(column=3,row=7)
b5_2.grid(column=4,row=7)
b5_3.grid(column=5,row=7)
b5_4.grid(column=6,row=7)
b5_5.grid(column=7,row=7)
b5_6.grid(column=8,row=7)
b5_7.grid(column=9,row=7)
b5_8.grid(column=10,row=7)
b5_9.grid(column=11,row=7)
b5_10.grid(column=12,row=7)
b5_11.grid(column=13,row=7)
b5_12.grid(column=14,row=7)
b5_13.grid(column=15,row=7)
b5_14.grid(column=16,row=7)
b5_15.grid(column=17,row=7)
b5_17.grid(column=19,row=7)
trig_6.grid(column=25,row=7)

b6_0.grid(column=2,row=8)
b6_1.grid(column=3,row=8)
b6_2.grid(column=4,row=8)
b6_3.grid(column=5,row=8)
b6_4.grid(column=6,row=8)
b6_5.grid(column=7,row=8)
b6_6.grid(column=8,row=8)
b6_7.grid(column=9,row=8)
b6_8.grid(column=10,row=8)
b6_9.grid(column=11,row=8)
b6_10.grid(column=12,row=8)
b6_11.grid(column=13,row=8)
b6_12.grid(column=14,row=8)
b6_13.grid(column=15,row=8)
b6_14.grid(column=16,row=8)
b6_15.grid(column=17,row=8)
b6_17.grid(column=19,row=8)
trig_7.grid(column=25,row=8)

b7_0.grid(column=2,row=9)
b7_1.grid(column=3,row=9)
b7_2.grid(column=4,row=9)
b7_3.grid(column=5,row=9)
b7_4.grid(column=6,row=9)
b7_5.grid(column=7,row=9)
b7_6.grid(column=8,row=9)
b7_7.grid(column=9,row=9)
b7_8.grid(column=10,row=9)
b7_9.grid(column=11,row=9)
b7_10.grid(column=12,row=9)
b7_11.grid(column=13,row=9)
b7_12.grid(column=14,row=9)
b7_13.grid(column=15,row=9)
b7_14.grid(column=16,row=9)
b7_15.grid(column=17,row=9)
b7_17.grid(column=19,row=9)
trig_8.grid(column=25,row=9)

# Group 3

# defining labels
nameb8_0 = ttk.Label(content, text="Beat 09", background=c1.get())
nameb9_0 = ttk.Label(content, text="Beat 10", background=c1.get())
nameb10_0 = ttk.Label(content, text="Beat 11", background=c1.get())
nameb11_0 = ttk.Label(content, text="Beat 12", background=c1.get())


# Defining number type
b8_0var = IntVar()
b8_1var = IntVar()
b8_2var = IntVar()
b8_3var = IntVar()
b8_4var = IntVar()
b8_5var = IntVar()
b8_6var = IntVar()
b8_7var = IntVar()
b8_8var = IntVar()
b8_9var = IntVar()
b8_10var = IntVar()
b8_11var = IntVar()
b8_12var = IntVar()
b8_13var = IntVar()
b8_14var = IntVar()
b8_15var = IntVar()
b8_17var = IntVar()
trig_9var = IntVar()

b9_0var = IntVar()
b9_1var = IntVar()
b9_2var = IntVar()
b9_3var = IntVar()
b9_4var = IntVar()
b9_5var = IntVar()
b9_6var = IntVar()
b9_7var = IntVar()
b9_8var = IntVar()
b9_9var = IntVar()
b9_10var = IntVar()
b9_11var = IntVar()
b9_12var = IntVar()
b9_13var = IntVar()
b9_14var = IntVar()
b9_15var = IntVar()
b9_17var = IntVar()
trig_10var = IntVar()

b10_0var = IntVar()
b10_1var = IntVar()
b10_2var = IntVar()
b10_3var = IntVar()
b10_4var = IntVar()
b10_5var = IntVar()
b10_6var = IntVar()
b10_7var = IntVar()
b10_8var = IntVar()
b10_9var = IntVar()
b10_10var = IntVar()
b10_11var = IntVar()
b10_12var = IntVar()
b10_13var = IntVar()
b10_14var = IntVar()
b10_15var = IntVar()
b10_17var = IntVar()
trig_11var = IntVar()

b11_0var = IntVar()
b11_1var = IntVar()
b11_2var = IntVar()
b11_3var = IntVar()
b11_4var = IntVar()
b11_5var = IntVar()
b11_6var = IntVar()
b11_7var = IntVar()
b11_8var = IntVar()
b11_9var = IntVar()
b11_10var = IntVar()
b11_11var = IntVar()
b11_12var = IntVar()
b11_13var = IntVar()
b11_14var = IntVar()
b11_15var = IntVar()
b11_17var = IntVar()
trig_12var = IntVar()

# Setting default button position
b8_0var.set(0)
b8_1var.set(0)
b8_2var.set(0)
b8_3var.set(0)
b8_4var.set(0)
b8_5var.set(0)
b8_6var.set(0)
b8_7var.set(0)
b8_8var.set(0)
b8_9var.set(0)
b8_10var.set(0)
b8_11var.set(0)
b8_12var.set(0)
b8_13var.set(0)
b8_14var.set(0)
b8_15var.set(0)
b8_17var.set(0)
trig_9var.set(0)

b9_0var.set(0)
b9_1var.set(0)
b9_2var.set(0)
b9_3var.set(0)
b9_4var.set(0)
b9_5var.set(0)
b9_6var.set(0)
b9_7var.set(0)
b9_8var.set(0)
b9_9var.set(0)
b9_10var.set(0)
b9_11var.set(0)
b9_12var.set(0)
b9_13var.set(0)
b9_14var.set(0)
b9_15var.set(0)
b9_17var.set(0)
trig_10var.set(0)

b10_0var.set(0)
b10_1var.set(0)
b10_2var.set(0)
b10_3var.set(0)
b10_4var.set(0)
b10_5var.set(0)
b10_6var.set(0)
b10_7var.set(0)
b10_8var.set(0)
b10_9var.set(0)
b10_10var.set(0)
b10_11var.set(0)
b10_12var.set(0)
b10_13var.set(0)
b10_14var.set(0)
b10_15var.set(0)
b10_17var.set(0)
trig_11var.set(0)

b11_0var.set(0)
b11_1var.set(0)
b11_2var.set(0)
b11_3var.set(0)
b11_4var.set(0)
b11_5var.set(0)
b11_6var.set(0)
b11_7var.set(0)
b11_8var.set(0)
b11_9var.set(0)
b11_10var.set(0)
b11_11var.set(0)
b11_12var.set(0)
b11_13var.set(0)
b11_14var.set(0)
b11_15var.set(0)
b11_17var.set(0)
trig_12var.set(0)

# Defining button
b8_0 = ttk.Checkbutton(content, variable=b8_0var, onvalue=1, offvalue=0)
b8_1 = ttk.Checkbutton(content, variable=b8_1var, onvalue=1, offvalue=0)
b8_2 = ttk.Checkbutton(content, variable=b8_2var, onvalue=1, offvalue=0)
b8_3 = ttk.Checkbutton(content, variable=b8_3var, onvalue=1, offvalue=0)
b8_4 = ttk.Checkbutton(content, variable=b8_4var, onvalue=1, offvalue=0)
b8_5 = ttk.Checkbutton(content, variable=b8_5var, onvalue=1, offvalue=0)
b8_6 = ttk.Checkbutton(content, variable=b8_6var, onvalue=1, offvalue=0)
b8_7 = ttk.Checkbutton(content, variable=b8_7var, onvalue=1, offvalue=0)
b8_8 = ttk.Checkbutton(content, variable=b8_8var, onvalue=1, offvalue=0)
b8_9 = ttk.Checkbutton(content, variable=b8_9var, onvalue=1, offvalue=0)
b8_10 = ttk.Checkbutton(content, variable=b8_10var, onvalue=1, offvalue=0)
b8_11 = ttk.Checkbutton(content, variable=b8_11var, onvalue=1, offvalue=0)
b8_12 = ttk.Checkbutton(content, variable=b8_12var, onvalue=1, offvalue=0)
b8_13 = ttk.Checkbutton(content, variable=b8_13var, onvalue=1, offvalue=0)
b8_14 = ttk.Checkbutton(content, variable=b8_14var, onvalue=1, offvalue=0)
b8_15 = ttk.Checkbutton(content, variable=b8_15var, onvalue=1, offvalue=0)
b8_17 = ttk.Checkbutton(content, text="HALT", variable=b8_17var, onvalue=1, offvalue=0)
trig_9 = ttk.Checkbutton(content, variable=trig_9var, onvalue=1, offvalue=0)

b9_0 = ttk.Checkbutton(content, variable=b9_0var, onvalue=1, offvalue=0)
b9_1 = ttk.Checkbutton(content, variable=b9_1var, onvalue=1, offvalue=0)
b9_2 = ttk.Checkbutton(content, variable=b9_2var, onvalue=1, offvalue=0)
b9_3 = ttk.Checkbutton(content, variable=b9_3var, onvalue=1, offvalue=0)
b9_4 = ttk.Checkbutton(content, variable=b9_4var, onvalue=1, offvalue=0)
b9_5 = ttk.Checkbutton(content, variable=b9_5var, onvalue=1, offvalue=0)
b9_6 = ttk.Checkbutton(content, variable=b9_6var, onvalue=1, offvalue=0)
b9_7 = ttk.Checkbutton(content, variable=b9_7var, onvalue=1, offvalue=0)
b9_8 = ttk.Checkbutton(content, variable=b9_8var, onvalue=1, offvalue=0)
b9_9 = ttk.Checkbutton(content, variable=b9_9var, onvalue=1, offvalue=0)
b9_10 = ttk.Checkbutton(content, variable=b9_10var, onvalue=1, offvalue=0)
b9_11 = ttk.Checkbutton(content, variable=b9_11var, onvalue=1, offvalue=0)
b9_12 = ttk.Checkbutton(content, variable=b9_12var, onvalue=1, offvalue=0)
b9_13 = ttk.Checkbutton(content, variable=b9_13var, onvalue=1, offvalue=0)
b9_14 = ttk.Checkbutton(content, variable=b9_14var, onvalue=1, offvalue=0)
b9_15 = ttk.Checkbutton(content, variable=b9_15var, onvalue=1, offvalue=0)
b9_17 = ttk.Checkbutton(content, text="HALT", variable=b9_17var, onvalue=1, offvalue=0)
trig_10 = ttk.Checkbutton(content, variable=trig_10var, onvalue=1, offvalue=0)

b10_0 = ttk.Checkbutton(content, variable=b10_0var, onvalue=1, offvalue=0)
b10_1 = ttk.Checkbutton(content, variable=b10_1var, onvalue=1, offvalue=0)
b10_2 = ttk.Checkbutton(content, variable=b10_2var, onvalue=1, offvalue=0)
b10_3 = ttk.Checkbutton(content, variable=b10_3var, onvalue=1, offvalue=0)
b10_4 = ttk.Checkbutton(content, variable=b10_4var, onvalue=1, offvalue=0)
b10_5 = ttk.Checkbutton(content, variable=b10_5var, onvalue=1, offvalue=0)
b10_6 = ttk.Checkbutton(content, variable=b10_6var, onvalue=1, offvalue=0)
b10_7 = ttk.Checkbutton(content, variable=b10_7var, onvalue=1, offvalue=0)
b10_8 = ttk.Checkbutton(content, variable=b10_8var, onvalue=1, offvalue=0)
b10_9 = ttk.Checkbutton(content, variable=b10_9var, onvalue=1, offvalue=0)
b10_10 = ttk.Checkbutton(content, variable=b10_10var, onvalue=1, offvalue=0)
b10_11 = ttk.Checkbutton(content, variable=b10_11var, onvalue=1, offvalue=0)
b10_12 = ttk.Checkbutton(content, variable=b10_12var, onvalue=1, offvalue=0)
b10_13 = ttk.Checkbutton(content, variable=b10_13var, onvalue=1, offvalue=0)
b10_14 = ttk.Checkbutton(content, variable=b10_14var, onvalue=1, offvalue=0)
b10_15 = ttk.Checkbutton(content, variable=b10_15var, onvalue=1, offvalue=0)
b10_17 = ttk.Checkbutton(content, text="HALT", variable=b10_17var, onvalue=1, offvalue=0)
trig_11 = ttk.Checkbutton(content, variable=trig_11var, onvalue=1, offvalue=0)

b11_0 = ttk.Checkbutton(content, variable=b11_0var, onvalue=1, offvalue=0)
b11_1 = ttk.Checkbutton(content, variable=b11_1var, onvalue=1, offvalue=0)
b11_2 = ttk.Checkbutton(content, variable=b11_2var, onvalue=1, offvalue=0)
b11_3 = ttk.Checkbutton(content, variable=b11_3var, onvalue=1, offvalue=0)
b11_4 = ttk.Checkbutton(content, variable=b11_4var, onvalue=1, offvalue=0)
b11_5 = ttk.Checkbutton(content, variable=b11_5var, onvalue=1, offvalue=0)
b11_6 = ttk.Checkbutton(content, variable=b11_6var, onvalue=1, offvalue=0)
b11_7 = ttk.Checkbutton(content, variable=b11_7var, onvalue=1, offvalue=0)
b11_8 = ttk.Checkbutton(content, variable=b11_8var, onvalue=1, offvalue=0)
b11_9 = ttk.Checkbutton(content, variable=b11_9var, onvalue=1, offvalue=0)
b11_10 = ttk.Checkbutton(content, variable=b11_10var, onvalue=1, offvalue=0)
b11_11 = ttk.Checkbutton(content, variable=b11_11var, onvalue=1, offvalue=0)
b11_12 = ttk.Checkbutton(content, variable=b11_12var, onvalue=1, offvalue=0)
b11_13 = ttk.Checkbutton(content, variable=b11_13var, onvalue=1, offvalue=0)
b11_14 = ttk.Checkbutton(content, variable=b11_14var, onvalue=1, offvalue=0)
b11_15 = ttk.Checkbutton(content, variable=b11_15var, onvalue=1, offvalue=0)
b11_17 = ttk.Checkbutton(content, text="HALT", variable=b11_17var, onvalue=1, offvalue=0)
trig_12 = ttk.Checkbutton(content, variable=trig_12var, onvalue=1, offvalue=0)

# Placing text to the left each beat
nameb8_0.grid(column=1, row=10)
nameb9_0.grid(column=1, row=11)
nameb10_0.grid(column=1, row=12)
nameb11_0.grid(column=1, row=13)

# Placing buttons on grid
b8_0.grid(column=2,row=10)
b8_1.grid(column=3,row=10)
b8_2.grid(column=4,row=10)
b8_3.grid(column=5,row=10)
b8_4.grid(column=6,row=10)
b8_5.grid(column=7,row=10)
b8_6.grid(column=8,row=10)
b8_7.grid(column=9,row=10)
b8_8.grid(column=10,row=10)
b8_9.grid(column=11,row=10)
b8_10.grid(column=12,row=10)
b8_11.grid(column=13,row=10)
b8_12.grid(column=14,row=10)
b8_13.grid(column=15,row=10)
b8_14.grid(column=16,row=10)
b8_15.grid(column=17,row=10)
b8_17.grid(column=19,row=10)
trig_9.grid(column=25,row=10)

b9_0.grid(column=2,row=11)
b9_1.grid(column=3,row=11)
b9_2.grid(column=4,row=11)
b9_3.grid(column=5,row=11)
b9_4.grid(column=6,row=11)
b9_5.grid(column=7,row=11)
b9_6.grid(column=8,row=11)
b9_7.grid(column=9,row=11)
b9_8.grid(column=10,row=11)
b9_9.grid(column=11,row=11)
b9_10.grid(column=12,row=11)
b9_11.grid(column=13,row=11)
b9_12.grid(column=14,row=11)
b9_13.grid(column=15,row=11)
b9_14.grid(column=16,row=11)
b9_15.grid(column=17,row=11)
b9_17.grid(column=19,row=11)
trig_10.grid(column=25,row=11)

b10_0.grid(column=2,row=12)
b10_1.grid(column=3,row=12)
b10_2.grid(column=4,row=12)
b10_3.grid(column=5,row=12)
b10_4.grid(column=6,row=12)
b10_5.grid(column=7,row=12)
b10_6.grid(column=8,row=12)
b10_7.grid(column=9,row=12)
b10_8.grid(column=10,row=12)
b10_9.grid(column=11,row=12)
b10_10.grid(column=12,row=12)
b10_11.grid(column=13,row=12)
b10_12.grid(column=14,row=12)
b10_13.grid(column=15,row=12)
b10_14.grid(column=16,row=12)
b10_15.grid(column=17,row=12)
b10_17.grid(column=19,row=12)
trig_11.grid(column=25,row=12)

b11_0.grid(column=2,row=13)
b11_1.grid(column=3,row=13)
b11_2.grid(column=4,row=13)
b11_3.grid(column=5,row=13)
b11_4.grid(column=6,row=13)
b11_5.grid(column=7,row=13)
b11_6.grid(column=8,row=13)
b11_7.grid(column=9,row=13)
b11_8.grid(column=10,row=13)
b11_9.grid(column=11,row=13)
b11_10.grid(column=12,row=13)
b11_11.grid(column=13,row=13)
b11_12.grid(column=14,row=13)
b11_13.grid(column=15,row=13)
b11_14.grid(column=16,row=13)
b11_15.grid(column=17,row=13)
b11_17.grid(column=19,row=13)
trig_12.grid(column=25,row=13)

# Group 4

# defining labels
nameb12_0 = ttk.Label(content, text="Beat 13", background=c1.get())
nameb13_0 = ttk.Label(content, text="Beat 14", background=c1.get())
nameb14_0 = ttk.Label(content, text="Beat 15", background=c1.get())
nameb15_0 = ttk.Label(content, text="Beat 16", background=c1.get())


# Defining number type
b12_0var = IntVar()
b12_1var = IntVar()
b12_2var = IntVar()
b12_3var = IntVar()
b12_4var = IntVar()
b12_5var = IntVar()
b12_6var = IntVar()
b12_7var = IntVar()
b12_8var = IntVar()
b12_9var = IntVar()
b12_10var = IntVar()
b12_11var = IntVar()
b12_12var = IntVar()
b12_13var = IntVar()
b12_14var = IntVar()
b12_15var = IntVar()
b12_17var = IntVar()
trig_13var = IntVar()

b13_0var = IntVar()
b13_1var = IntVar()
b13_2var = IntVar()
b13_3var = IntVar()
b13_4var = IntVar()
b13_5var = IntVar()
b13_6var = IntVar()
b13_7var = IntVar()
b13_8var = IntVar()
b13_9var = IntVar()
b13_10var = IntVar()
b13_11var = IntVar()
b13_12var = IntVar()
b13_13var = IntVar()
b13_14var = IntVar()
b13_15var = IntVar()
b13_17var = IntVar()
trig_14var = IntVar()

b14_0var = IntVar()
b14_1var = IntVar()
b14_2var = IntVar()
b14_3var = IntVar()
b14_4var = IntVar()
b14_5var = IntVar()
b14_6var = IntVar()
b14_7var = IntVar()
b14_8var = IntVar()
b14_9var = IntVar()
b14_10var = IntVar()
b14_11var = IntVar()
b14_12var = IntVar()
b14_13var = IntVar()
b14_14var = IntVar()
b14_15var = IntVar()
b14_17var = IntVar()
trig_15var = IntVar()

b15_0var = IntVar()
b15_1var = IntVar()
b15_2var = IntVar()
b15_3var = IntVar()
b15_4var = IntVar()
b15_5var = IntVar()
b15_6var = IntVar()
b15_7var = IntVar()
b15_8var = IntVar()
b15_9var = IntVar()
b15_10var = IntVar()
b15_11var = IntVar()
b15_12var = IntVar()
b15_13var = IntVar()
b15_14var = IntVar()
b15_15var = IntVar()
b15_17var = IntVar()
trig_16var = IntVar()

# Setting default button position
b12_0var.set(0)
b12_1var.set(0)
b12_2var.set(0)
b12_3var.set(0)
b12_4var.set(0)
b12_5var.set(0)
b12_6var.set(0)
b12_7var.set(0)
b12_8var.set(0)
b12_9var.set(0)
b12_10var.set(0)
b12_11var.set(0)
b12_12var.set(0)
b12_13var.set(0)
b12_14var.set(0)
b12_15var.set(0)
b12_17var.set(0)
trig_13var.set(0)

b13_0var.set(0)
b13_1var.set(0)
b13_2var.set(0)
b13_3var.set(0)
b13_4var.set(0)
b13_5var.set(0)
b13_6var.set(0)
b13_7var.set(0)
b13_8var.set(0)
b13_9var.set(0)
b13_10var.set(0)
b13_11var.set(0)
b13_12var.set(0)
b13_13var.set(0)
b13_14var.set(0)
b13_15var.set(0)
b13_17var.set(0)
trig_14var.set(0)

b14_0var.set(0)
b14_1var.set(0)
b14_2var.set(0)
b14_3var.set(0)
b14_4var.set(0)
b14_5var.set(0)
b14_6var.set(0)
b14_7var.set(0)
b14_8var.set(0)
b14_9var.set(0)
b14_10var.set(0)
b14_11var.set(0)
b14_12var.set(0)
b14_13var.set(0)
b14_14var.set(0)
b14_15var.set(0)
b14_17var.set(0)
trig_15var.set(0)

b15_0var.set(0)
b15_1var.set(0)
b15_2var.set(0)
b15_3var.set(0)
b15_4var.set(0)
b15_5var.set(0)
b15_6var.set(0)
b15_7var.set(0)
b15_8var.set(0)
b15_9var.set(0)
b15_10var.set(0)
b15_11var.set(0)
b15_12var.set(0)
b15_13var.set(0)
b15_14var.set(0)
b15_15var.set(0)
b15_17var.set(0)
trig_16var.set(0)

# Defining button
b12_0 = ttk.Checkbutton(content, variable=b12_0var, onvalue=1, offvalue=0)
b12_1 = ttk.Checkbutton(content, variable=b12_1var, onvalue=1, offvalue=0)
b12_2 = ttk.Checkbutton(content, variable=b12_2var, onvalue=1, offvalue=0)
b12_3 = ttk.Checkbutton(content, variable=b12_3var, onvalue=1, offvalue=0)
b12_4 = ttk.Checkbutton(content, variable=b12_4var, onvalue=1, offvalue=0)
b12_5 = ttk.Checkbutton(content, variable=b12_5var, onvalue=1, offvalue=0)
b12_6 = ttk.Checkbutton(content, variable=b12_6var, onvalue=1, offvalue=0)
b12_7 = ttk.Checkbutton(content, variable=b12_7var, onvalue=1, offvalue=0)
b12_8 = ttk.Checkbutton(content, variable=b12_8var, onvalue=1, offvalue=0)
b12_9 = ttk.Checkbutton(content, variable=b12_9var, onvalue=1, offvalue=0)
b12_10 = ttk.Checkbutton(content, variable=b12_10var, onvalue=1, offvalue=0)
b12_11 = ttk.Checkbutton(content, variable=b12_11var, onvalue=1, offvalue=0)
b12_12 = ttk.Checkbutton(content, variable=b12_12var, onvalue=1, offvalue=0)
b12_13 = ttk.Checkbutton(content, variable=b12_13var, onvalue=1, offvalue=0)
b12_14 = ttk.Checkbutton(content, variable=b12_14var, onvalue=1, offvalue=0)
b12_15 = ttk.Checkbutton(content, variable=b12_15var, onvalue=1, offvalue=0)
b12_17 = ttk.Checkbutton(content, text="HALT", variable=b12_17var, onvalue=1, offvalue=0)
trig_13 = ttk.Checkbutton(content, variable=trig_13var, onvalue=1, offvalue=0)

b13_0 = ttk.Checkbutton(content, variable=b13_0var, onvalue=1, offvalue=0)
b13_1 = ttk.Checkbutton(content, variable=b13_1var, onvalue=1, offvalue=0)
b13_2 = ttk.Checkbutton(content, variable=b13_2var, onvalue=1, offvalue=0)
b13_3 = ttk.Checkbutton(content, variable=b13_3var, onvalue=1, offvalue=0)
b13_4 = ttk.Checkbutton(content, variable=b13_4var, onvalue=1, offvalue=0)
b13_5 = ttk.Checkbutton(content, variable=b13_5var, onvalue=1, offvalue=0)
b13_6 = ttk.Checkbutton(content, variable=b13_6var, onvalue=1, offvalue=0)
b13_7 = ttk.Checkbutton(content, variable=b13_7var, onvalue=1, offvalue=0)
b13_8 = ttk.Checkbutton(content, variable=b13_8var, onvalue=1, offvalue=0)
b13_9 = ttk.Checkbutton(content, variable=b13_9var, onvalue=1, offvalue=0)
b13_10 = ttk.Checkbutton(content, variable=b13_10var, onvalue=1, offvalue=0)
b13_11 = ttk.Checkbutton(content, variable=b13_11var, onvalue=1, offvalue=0)
b13_12 = ttk.Checkbutton(content, variable=b13_12var, onvalue=1, offvalue=0)
b13_13 = ttk.Checkbutton(content, variable=b13_13var, onvalue=1, offvalue=0)
b13_14 = ttk.Checkbutton(content, variable=b13_14var, onvalue=1, offvalue=0)
b13_15 = ttk.Checkbutton(content, variable=b13_15var, onvalue=1, offvalue=0)
b13_17 = ttk.Checkbutton(content, text="HALT", variable=b13_17var, onvalue=1, offvalue=0)
trig_14 = ttk.Checkbutton(content, variable=trig_14var, onvalue=1, offvalue=0)

b14_0 = ttk.Checkbutton(content, variable=b14_0var, onvalue=1, offvalue=0)
b14_1 = ttk.Checkbutton(content, variable=b14_1var, onvalue=1, offvalue=0)
b14_2 = ttk.Checkbutton(content, variable=b14_2var, onvalue=1, offvalue=0)
b14_3 = ttk.Checkbutton(content, variable=b14_3var, onvalue=1, offvalue=0)
b14_4 = ttk.Checkbutton(content, variable=b14_4var, onvalue=1, offvalue=0)
b14_5 = ttk.Checkbutton(content, variable=b14_5var, onvalue=1, offvalue=0)
b14_6 = ttk.Checkbutton(content, variable=b14_6var, onvalue=1, offvalue=0)
b14_7 = ttk.Checkbutton(content, variable=b14_7var, onvalue=1, offvalue=0)
b14_8 = ttk.Checkbutton(content, variable=b14_8var, onvalue=1, offvalue=0)
b14_9 = ttk.Checkbutton(content, variable=b14_9var, onvalue=1, offvalue=0)
b14_10 = ttk.Checkbutton(content, variable=b14_10var, onvalue=1, offvalue=0)
b14_11 = ttk.Checkbutton(content, variable=b14_11var, onvalue=1, offvalue=0)
b14_12 = ttk.Checkbutton(content, variable=b14_12var, onvalue=1, offvalue=0)
b14_13 = ttk.Checkbutton(content, variable=b14_13var, onvalue=1, offvalue=0)
b14_14 = ttk.Checkbutton(content, variable=b14_14var, onvalue=1, offvalue=0)
b14_15 = ttk.Checkbutton(content, variable=b14_15var, onvalue=1, offvalue=0)
b14_17 = ttk.Checkbutton(content, text="HALT", variable=b14_17var, onvalue=1, offvalue=0)
trig_15 = ttk.Checkbutton(content, variable=trig_15var, onvalue=1, offvalue=0)

b15_0 = ttk.Checkbutton(content, variable=b15_0var, onvalue=1, offvalue=0)
b15_1 = ttk.Checkbutton(content, variable=b15_1var, onvalue=1, offvalue=0)
b15_2 = ttk.Checkbutton(content, variable=b15_2var, onvalue=1, offvalue=0)
b15_3 = ttk.Checkbutton(content, variable=b15_3var, onvalue=1, offvalue=0)
b15_4 = ttk.Checkbutton(content, variable=b15_4var, onvalue=1, offvalue=0)
b15_5 = ttk.Checkbutton(content, variable=b15_5var, onvalue=1, offvalue=0)
b15_6 = ttk.Checkbutton(content, variable=b15_6var, onvalue=1, offvalue=0)
b15_7 = ttk.Checkbutton(content, variable=b15_7var, onvalue=1, offvalue=0)
b15_8 = ttk.Checkbutton(content, variable=b15_8var, onvalue=1, offvalue=0)
b15_9 = ttk.Checkbutton(content, variable=b15_9var, onvalue=1, offvalue=0)
b15_10 = ttk.Checkbutton(content, variable=b15_10var, onvalue=1, offvalue=0)
b15_11 = ttk.Checkbutton(content, variable=b15_11var, onvalue=1, offvalue=0)
b15_12 = ttk.Checkbutton(content, variable=b15_12var, onvalue=1, offvalue=0)
b15_13 = ttk.Checkbutton(content, variable=b15_13var, onvalue=1, offvalue=0)
b15_14 = ttk.Checkbutton(content, variable=b15_14var, onvalue=1, offvalue=0)
b15_15 = ttk.Checkbutton(content, variable=b15_15var, onvalue=1, offvalue=0)
b15_17 = ttk.Checkbutton(content, text="HALT", variable=b15_17var, onvalue=1, offvalue=0)
trig_16 = ttk.Checkbutton(content, variable=trig_16var, onvalue=1, offvalue=0)

# Placing text beside each beat
nameb12_0.grid(column=1, row=14)
nameb13_0.grid(column=1, row=15)
nameb14_0.grid(column=1, row=16)
nameb15_0.grid(column=1, row=17)


# Placing buttons on grid
b12_0.grid(column=2,row=14)
b12_1.grid(column=3,row=14)
b12_2.grid(column=4,row=14)
b12_3.grid(column=5,row=14)
b12_4.grid(column=6,row=14)
b12_5.grid(column=7,row=14)
b12_6.grid(column=8,row=14)
b12_7.grid(column=9,row=14)
b12_8.grid(column=10,row=14)
b12_9.grid(column=11,row=14)
b12_10.grid(column=12,row=14)
b12_11.grid(column=13,row=14)
b12_12.grid(column=14,row=14)
b12_13.grid(column=15,row=14)
b12_14.grid(column=16,row=14)
b12_15.grid(column=17,row=14)
b12_17.grid(column=19,row=14)
trig_13.grid(column=25,row=14)

b13_0.grid(column=2,row=15)
b13_1.grid(column=3,row=15)
b13_2.grid(column=4,row=15)
b13_3.grid(column=5,row=15)
b13_4.grid(column=6,row=15)
b13_5.grid(column=7,row=15)
b13_6.grid(column=8,row=15)
b13_7.grid(column=9,row=15)
b13_8.grid(column=10,row=15)
b13_9.grid(column=11,row=15)
b13_10.grid(column=12,row=15)
b13_11.grid(column=13,row=15)
b13_12.grid(column=14,row=15)
b13_13.grid(column=15,row=15)
b13_14.grid(column=16,row=15)
b13_15.grid(column=17,row=15)
b13_17.grid(column=19,row=15)
trig_14.grid(column=25,row=15)

b14_0.grid(column=2,row=16)
b14_1.grid(column=3,row=16)
b14_2.grid(column=4,row=16)
b14_3.grid(column=5,row=16)
b14_4.grid(column=6,row=16)
b14_5.grid(column=7,row=16)
b14_6.grid(column=8,row=16)
b14_7.grid(column=9,row=16)
b14_8.grid(column=10,row=16)
b14_9.grid(column=11,row=16)
b14_10.grid(column=12,row=16)
b14_11.grid(column=13,row=16)
b14_12.grid(column=14,row=16)
b14_13.grid(column=15,row=16)
b14_14.grid(column=16,row=16)
b14_15.grid(column=17,row=16)
b14_17.grid(column=19,row=16)
trig_15.grid(column=25,row=16)

b15_0.grid(column=2,row=17)
b15_1.grid(column=3,row=17)
b15_2.grid(column=4,row=17)
b15_3.grid(column=5,row=17)
b15_4.grid(column=6,row=17)
b15_5.grid(column=7,row=17)
b15_6.grid(column=8,row=17)
b15_7.grid(column=9,row=17)
b15_8.grid(column=10,row=17)
b15_9.grid(column=11,row=17)
b15_10.grid(column=12,row=17)
b15_11.grid(column=13,row=17)
b15_12.grid(column=14,row=17)
b15_13.grid(column=15,row=17)
b15_14.grid(column=16,row=17)
b15_15.grid(column=17,row=17)
b15_17.grid(column=19,row=17)
trig_16.grid(column=25,row=17)

# Group 5

# defining labels
nameb16_0 = ttk.Label(content, text="Beat 17", background=c1.get())
nameb17_0 = ttk.Label(content, text="Beat 18", background=c1.get())
nameb18_0 = ttk.Label(content, text="Beat 19", background=c1.get())
nameb19_0 = ttk.Label(content, text="Beat 20", background=c1.get())


# Defining number type
b16_0var = IntVar()
b16_1var = IntVar()
b16_2var = IntVar()
b16_3var = IntVar()
b16_4var = IntVar()
b16_5var = IntVar()
b16_6var = IntVar()
b16_7var = IntVar()
b16_8var = IntVar()
b16_9var = IntVar()
b16_10var = IntVar()
b16_11var = IntVar()
b16_12var = IntVar()
b16_13var = IntVar()
b16_14var = IntVar()
b16_15var = IntVar()
b16_17var = IntVar()
trig_17var = IntVar()

b17_0var = IntVar()
b17_1var = IntVar()
b17_2var = IntVar()
b17_3var = IntVar()
b17_4var = IntVar()
b17_5var = IntVar()
b17_6var = IntVar()
b17_7var = IntVar()
b17_8var = IntVar()
b17_9var = IntVar()
b17_10var = IntVar()
b17_11var = IntVar()
b17_12var = IntVar()
b17_13var = IntVar()
b17_14var = IntVar()
b17_15var = IntVar()
b17_17var = IntVar()
trig_18var = IntVar()

b18_0var = IntVar()
b18_1var = IntVar()
b18_2var = IntVar()
b18_3var = IntVar()
b18_4var = IntVar()
b18_5var = IntVar()
b18_6var = IntVar()
b18_7var = IntVar()
b18_8var = IntVar()
b18_9var = IntVar()
b18_10var = IntVar()
b18_11var = IntVar()
b18_12var = IntVar()
b18_13var = IntVar()
b18_14var = IntVar()
b18_15var = IntVar()
b18_17var = IntVar()
trig_19var = IntVar()

b19_0var = IntVar()
b19_1var = IntVar()
b19_2var = IntVar()
b19_3var = IntVar()
b19_4var = IntVar()
b19_5var = IntVar()
b19_6var = IntVar()
b19_7var = IntVar()
b19_8var = IntVar()
b19_9var = IntVar()
b19_10var = IntVar()
b19_11var = IntVar()
b19_12var = IntVar()
b19_13var = IntVar()
b19_14var = IntVar()
b19_15var = IntVar()
b19_17var = IntVar()
trig_20var = IntVar()

# Setting default button position
b16_0var.set(0)
b16_1var.set(0)
b16_2var.set(0)
b16_3var.set(0)
b16_4var.set(0)
b16_5var.set(0)
b16_6var.set(0)
b16_7var.set(0)
b16_8var.set(0)
b16_9var.set(0)
b16_10var.set(0)
b16_11var.set(0)
b16_12var.set(0)
b16_13var.set(0)
b16_14var.set(0)
b16_15var.set(0)
b16_17var.set(0)
trig_17var.set(0)

b17_0var.set(0)
b17_1var.set(0)
b17_2var.set(0)
b17_3var.set(0)
b17_4var.set(0)
b17_5var.set(0)
b17_6var.set(0)
b17_7var.set(0)
b17_8var.set(0)
b17_9var.set(0)
b17_10var.set(0)
b17_11var.set(0)
b17_12var.set(0)
b17_13var.set(0)
b17_14var.set(0)
b17_15var.set(0)
b17_17var.set(0)
trig_18var.set(0)

b18_0var.set(0)
b18_1var.set(0)
b18_2var.set(0)
b18_3var.set(0)
b18_4var.set(0)
b18_5var.set(0)
b18_6var.set(0)
b18_7var.set(0)
b18_8var.set(0)
b18_9var.set(0)
b18_10var.set(0)
b18_11var.set(0)
b18_12var.set(0)
b18_13var.set(0)
b18_14var.set(0)
b18_15var.set(0)
b18_17var.set(0)
trig_19var.set(0)

b19_0var.set(0)
b19_1var.set(0)
b19_2var.set(0)
b19_3var.set(0)
b19_4var.set(0)
b19_5var.set(0)
b19_6var.set(0)
b19_7var.set(0)
b19_8var.set(0)
b19_9var.set(0)
b19_10var.set(0)
b19_11var.set(0)
b19_12var.set(0)
b19_13var.set(0)
b19_14var.set(0)
b19_15var.set(0)
b19_17var.set(0)
trig_20var.set(0)

# Defining button
b16_0 = ttk.Checkbutton(content, variable=b16_0var, onvalue=1, offvalue=0)
b16_1 = ttk.Checkbutton(content, variable=b16_1var, onvalue=1, offvalue=0)
b16_2 = ttk.Checkbutton(content, variable=b16_2var, onvalue=1, offvalue=0)
b16_3 = ttk.Checkbutton(content, variable=b16_3var, onvalue=1, offvalue=0)
b16_4 = ttk.Checkbutton(content, variable=b16_4var, onvalue=1, offvalue=0)
b16_5 = ttk.Checkbutton(content, variable=b16_5var, onvalue=1, offvalue=0)
b16_6 = ttk.Checkbutton(content, variable=b16_6var, onvalue=1, offvalue=0)
b16_7 = ttk.Checkbutton(content, variable=b16_7var, onvalue=1, offvalue=0)
b16_8 = ttk.Checkbutton(content, variable=b16_8var, onvalue=1, offvalue=0)
b16_9 = ttk.Checkbutton(content, variable=b16_9var, onvalue=1, offvalue=0)
b16_10 = ttk.Checkbutton(content, variable=b16_10var, onvalue=1, offvalue=0)
b16_11 = ttk.Checkbutton(content, variable=b16_11var, onvalue=1, offvalue=0)
b16_12 = ttk.Checkbutton(content, variable=b16_12var, onvalue=1, offvalue=0)
b16_13 = ttk.Checkbutton(content, variable=b16_13var, onvalue=1, offvalue=0)
b16_14 = ttk.Checkbutton(content, variable=b16_14var, onvalue=1, offvalue=0)
b16_15 = ttk.Checkbutton(content, variable=b16_15var, onvalue=1, offvalue=0)
b16_17 = ttk.Checkbutton(content, text="HALT", variable=b16_17var, onvalue=1, offvalue=0)
trig_17 = ttk.Checkbutton(content, variable=trig_17var, onvalue=1, offvalue=0)

b17_0 = ttk.Checkbutton(content, variable=b17_0var, onvalue=1, offvalue=0)
b17_1 = ttk.Checkbutton(content, variable=b17_1var, onvalue=1, offvalue=0)
b17_2 = ttk.Checkbutton(content, variable=b17_2var, onvalue=1, offvalue=0)
b17_3 = ttk.Checkbutton(content, variable=b17_3var, onvalue=1, offvalue=0)
b17_4 = ttk.Checkbutton(content, variable=b17_4var, onvalue=1, offvalue=0)
b17_5 = ttk.Checkbutton(content, variable=b17_5var, onvalue=1, offvalue=0)
b17_5 = ttk.Checkbutton(content, variable=b17_5var, onvalue=1, offvalue=0)
b17_6 = ttk.Checkbutton(content, variable=b17_6var, onvalue=1, offvalue=0)
b17_7 = ttk.Checkbutton(content, variable=b17_7var, onvalue=1, offvalue=0)
b17_8 = ttk.Checkbutton(content, variable=b17_8var, onvalue=1, offvalue=0)
b17_9 = ttk.Checkbutton(content, variable=b17_9var, onvalue=1, offvalue=0)
b17_10 = ttk.Checkbutton(content, variable=b17_10var, onvalue=1, offvalue=0)
b17_11 = ttk.Checkbutton(content, variable=b17_11var, onvalue=1, offvalue=0)
b17_12 = ttk.Checkbutton(content, variable=b17_12var, onvalue=1, offvalue=0)
b17_13 = ttk.Checkbutton(content, variable=b17_13var, onvalue=1, offvalue=0)
b17_14 = ttk.Checkbutton(content, variable=b17_14var, onvalue=1, offvalue=0)
b17_15 = ttk.Checkbutton(content, variable=b17_15var, onvalue=1, offvalue=0)
b17_17 = ttk.Checkbutton(content, text="HALT", variable=b17_17var, onvalue=1, offvalue=0)
trig_18 = ttk.Checkbutton(content, variable=trig_18var, onvalue=1, offvalue=0)

b18_0 = ttk.Checkbutton(content, variable=b18_0var, onvalue=1, offvalue=0)
b18_1 = ttk.Checkbutton(content, variable=b18_1var, onvalue=1, offvalue=0)
b18_2 = ttk.Checkbutton(content, variable=b18_2var, onvalue=1, offvalue=0)
b18_3 = ttk.Checkbutton(content, variable=b18_3var, onvalue=1, offvalue=0)
b18_4 = ttk.Checkbutton(content, variable=b18_4var, onvalue=1, offvalue=0)
b18_5 = ttk.Checkbutton(content, variable=b18_5var, onvalue=1, offvalue=0)
b18_5 = ttk.Checkbutton(content, variable=b18_5var, onvalue=1, offvalue=0)
b18_6 = ttk.Checkbutton(content, variable=b18_6var, onvalue=1, offvalue=0)
b18_7 = ttk.Checkbutton(content, variable=b18_7var, onvalue=1, offvalue=0)
b18_8 = ttk.Checkbutton(content, variable=b18_8var, onvalue=1, offvalue=0)
b18_9 = ttk.Checkbutton(content, variable=b18_9var, onvalue=1, offvalue=0)
b18_10 = ttk.Checkbutton(content, variable=b18_10var, onvalue=1, offvalue=0)
b18_11 = ttk.Checkbutton(content, variable=b18_11var, onvalue=1, offvalue=0)
b18_12 = ttk.Checkbutton(content, variable=b18_12var, onvalue=1, offvalue=0)
b18_13 = ttk.Checkbutton(content, variable=b18_13var, onvalue=1, offvalue=0)
b18_14 = ttk.Checkbutton(content, variable=b18_14var, onvalue=1, offvalue=0)
b18_15 = ttk.Checkbutton(content, variable=b18_15var, onvalue=1, offvalue=0)
b18_17 = ttk.Checkbutton(content, text="HALT", variable=b18_17var, onvalue=1, offvalue=0)
trig_19 = ttk.Checkbutton(content, variable=trig_19var, onvalue=1, offvalue=0)

b19_0 = ttk.Checkbutton(content, variable=b19_0var, onvalue=1, offvalue=0)
b19_1 = ttk.Checkbutton(content, variable=b19_1var, onvalue=1, offvalue=0)
b19_2 = ttk.Checkbutton(content, variable=b19_2var, onvalue=1, offvalue=0)
b19_3 = ttk.Checkbutton(content, variable=b19_3var, onvalue=1, offvalue=0)
b19_4 = ttk.Checkbutton(content, variable=b19_4var, onvalue=1, offvalue=0)
b19_5 = ttk.Checkbutton(content, variable=b19_5var, onvalue=1, offvalue=0)
b19_5 = ttk.Checkbutton(content, variable=b19_5var, onvalue=1, offvalue=0)
b19_6 = ttk.Checkbutton(content, variable=b19_6var, onvalue=1, offvalue=0)
b19_7 = ttk.Checkbutton(content, variable=b19_7var, onvalue=1, offvalue=0)
b19_8 = ttk.Checkbutton(content, variable=b19_8var, onvalue=1, offvalue=0)
b19_9 = ttk.Checkbutton(content, variable=b19_9var, onvalue=1, offvalue=0)
b19_10 = ttk.Checkbutton(content, variable=b19_10var, onvalue=1, offvalue=0)
b19_11 = ttk.Checkbutton(content, variable=b19_11var, onvalue=1, offvalue=0)
b19_12 = ttk.Checkbutton(content, variable=b19_12var, onvalue=1, offvalue=0)
b19_13 = ttk.Checkbutton(content, variable=b19_13var, onvalue=1, offvalue=0)
b19_14 = ttk.Checkbutton(content, variable=b19_14var, onvalue=1, offvalue=0)
b19_15 = ttk.Checkbutton(content, variable=b19_15var, onvalue=1, offvalue=0)
b19_17 = ttk.Checkbutton(content, text="HALT", variable=b19_17var, onvalue=1, offvalue=0)
trig_20 = ttk.Checkbutton(content, variable=trig_20var, onvalue=1, offvalue=0)

# Placing text beside each beat
nameb16_0.grid(column=1, row=18)
nameb17_0.grid(column=1, row=19)
nameb18_0.grid(column=1, row=20)
nameb19_0.grid(column=1, row=21)

# Placing buttons on grid
b16_0.grid(column=2,row=18)
b16_1.grid(column=3,row=18)
b16_2.grid(column=4,row=18)
b16_3.grid(column=5,row=18)
b16_4.grid(column=6,row=18)
b16_5.grid(column=7,row=18)
b16_6.grid(column=8,row=18)
b16_7.grid(column=9,row=18)
b16_8.grid(column=10,row=18)
b16_9.grid(column=11,row=18)
b16_10.grid(column=12,row=18)
b16_11.grid(column=13,row=18)
b16_12.grid(column=14,row=18)
b16_13.grid(column=15,row=18)
b16_14.grid(column=16,row=18)
b16_15.grid(column=17,row=18)
b16_17.grid(column=19,row=18)
trig_17.grid(column=25,row=18)

b17_0.grid(column=2,row=19)
b17_1.grid(column=3,row=19)
b17_2.grid(column=4,row=19)
b17_3.grid(column=5,row=19)
b17_4.grid(column=6,row=19)
b17_5.grid(column=7,row=19)
b17_6.grid(column=8,row=19)
b17_7.grid(column=9,row=19)
b17_8.grid(column=10,row=19)
b17_9.grid(column=11,row=19)
b17_10.grid(column=12,row=19)
b17_11.grid(column=13,row=19)
b17_12.grid(column=14,row=19)
b17_13.grid(column=15,row=19)
b17_14.grid(column=16,row=19)
b17_15.grid(column=17,row=19)
b17_17.grid(column=19,row=19)
trig_18.grid(column=25,row=19)

b18_0.grid(column=2,row=20)
b18_1.grid(column=3,row=20)
b18_2.grid(column=4,row=20)
b18_3.grid(column=5,row=20)
b18_4.grid(column=6,row=20)
b18_5.grid(column=7,row=20)
b18_6.grid(column=8,row=20)
b18_7.grid(column=9,row=20)
b18_8.grid(column=10,row=20)
b18_9.grid(column=11,row=20)
b18_10.grid(column=12,row=20)
b18_11.grid(column=13,row=20)
b18_12.grid(column=14,row=20)
b18_13.grid(column=15,row=20)
b18_14.grid(column=16,row=20)
b18_15.grid(column=17,row=20)
b18_17.grid(column=19,row=20)
trig_19.grid(column=25,row=20)

b19_0.grid(column=2,row=21)
b19_1.grid(column=3,row=21)
b19_2.grid(column=4,row=21)
b19_3.grid(column=5,row=21)
b19_4.grid(column=6,row=21)
b19_5.grid(column=7,row=21)
b19_6.grid(column=8,row=21)
b19_7.grid(column=9,row=21)
b19_8.grid(column=10,row=21)
b19_9.grid(column=11,row=21)
b19_10.grid(column=12,row=21)
b19_11.grid(column=13,row=21)
b19_12.grid(column=14,row=21)
b19_13.grid(column=15,row=21)
b19_14.grid(column=16,row=21)
b19_15.grid(column=17,row=21)
b19_17.grid(column=19,row=21)
trig_20.grid(column=25,row=21)

# Group 6

# defining labels
nameb20_0 = ttk.Label(content, text="Beat 21", background=c1.get())
nameb21_0 = ttk.Label(content, text="Beat 22", background=c1.get())
nameb22_0 = ttk.Label(content, text="Beat 23", background=c1.get())
nameb23_0 = ttk.Label(content, text="Beat 24", background=c1.get())


# Defining number type
b20_0var = IntVar()
b20_1var = IntVar()
b20_2var = IntVar()
b20_3var = IntVar()
b20_4var = IntVar()
b20_5var = IntVar()
b20_6var = IntVar()
b20_7var = IntVar()
b20_8var = IntVar()
b20_9var = IntVar()
b20_10var = IntVar()
b20_11var = IntVar()
b20_12var = IntVar()
b20_13var = IntVar()
b20_14var = IntVar()
b20_15var = IntVar()
b20_17var = IntVar()
trig_21var = IntVar()

b21_0var = IntVar()
b21_1var = IntVar()
b21_2var = IntVar()
b21_3var = IntVar()
b21_4var = IntVar()
b21_5var = IntVar()
b21_6var = IntVar()
b21_7var = IntVar()
b21_8var = IntVar()
b21_9var = IntVar()
b21_10var = IntVar()
b21_11var = IntVar()
b21_12var = IntVar()
b21_13var = IntVar()
b21_14var = IntVar()
b21_15var = IntVar()
b21_17var = IntVar()
trig_22var = IntVar()

b22_0var = IntVar()
b22_1var = IntVar()
b22_2var = IntVar()
b22_3var = IntVar()
b22_4var = IntVar()
b22_5var = IntVar()
b22_6var = IntVar()
b22_7var = IntVar()
b22_8var = IntVar()
b22_9var = IntVar()
b22_10var = IntVar()
b22_11var = IntVar()
b22_12var = IntVar()
b22_13var = IntVar()
b22_14var = IntVar()
b22_15var = IntVar()
b22_17var = IntVar()
trig_23var = IntVar()

b23_0var = IntVar()
b23_1var = IntVar()
b23_2var = IntVar()
b23_3var = IntVar()
b23_4var = IntVar()
b23_5var = IntVar()
b23_6var = IntVar()
b23_7var = IntVar()
b23_8var = IntVar()
b23_9var = IntVar()
b23_10var = IntVar()
b23_11var = IntVar()
b23_12var = IntVar()
b23_13var = IntVar()
b23_14var = IntVar()
b23_15var = IntVar()
b23_17var = IntVar()
trig_24var = IntVar()

# Setting default button position
b20_0var.set(0)
b20_1var.set(0)
b20_2var.set(0)
b20_3var.set(0)
b20_4var.set(0)
b20_5var.set(0)
b20_6var.set(0)
b20_7var.set(0)
b20_8var.set(0)
b20_9var.set(0)
b20_10var.set(0)
b20_11var.set(0)
b20_12var.set(0)
b20_13var.set(0)
b20_14var.set(0)
b20_15var.set(0)
b20_17var.set(0)
trig_21var.set(0)

b21_0var.set(0)
b21_1var.set(0)
b21_2var.set(0)
b21_3var.set(0)
b21_4var.set(0)
b21_5var.set(0)
b21_6var.set(0)
b21_7var.set(0)
b21_8var.set(0)
b21_9var.set(0)
b21_10var.set(0)
b21_11var.set(0)
b21_12var.set(0)
b21_13var.set(0)
b21_14var.set(0)
b21_15var.set(0)
b21_17var.set(0)
trig_22var.set(0)

b22_0var.set(0)
b22_1var.set(0)
b22_2var.set(0)
b22_3var.set(0)
b22_4var.set(0)
b22_5var.set(0)
b22_6var.set(0)
b22_7var.set(0)
b22_8var.set(0)
b22_9var.set(0)
b22_10var.set(0)
b22_11var.set(0)
b22_12var.set(0)
b22_13var.set(0)
b22_14var.set(0)
b22_15var.set(0)
b22_17var.set(0)
trig_23var.set(0)

b23_0var.set(0)
b23_1var.set(0)
b23_2var.set(0)
b23_3var.set(0)
b23_4var.set(0)
b23_5var.set(0)
b23_6var.set(0)
b23_7var.set(0)
b23_8var.set(0)
b23_9var.set(0)
b23_10var.set(0)
b23_11var.set(0)
b23_12var.set(0)
b23_13var.set(0)
b23_14var.set(0)
b23_15var.set(0)
b23_17var.set(0)
trig_24var.set(0)

# Defining button
b20_0 = ttk.Checkbutton(content, variable=b20_0var, onvalue=1, offvalue=0)
b20_1 = ttk.Checkbutton(content, variable=b20_1var, onvalue=1, offvalue=0)
b20_2 = ttk.Checkbutton(content, variable=b20_2var, onvalue=1, offvalue=0)
b20_3 = ttk.Checkbutton(content, variable=b20_3var, onvalue=1, offvalue=0)
b20_4 = ttk.Checkbutton(content, variable=b20_4var, onvalue=1, offvalue=0)
b20_5 = ttk.Checkbutton(content, variable=b20_5var, onvalue=1, offvalue=0)
b20_6 = ttk.Checkbutton(content, variable=b20_6var, onvalue=1, offvalue=0)
b20_7 = ttk.Checkbutton(content, variable=b20_7var, onvalue=1, offvalue=0)
b20_8 = ttk.Checkbutton(content, variable=b20_8var, onvalue=1, offvalue=0)
b20_9 = ttk.Checkbutton(content, variable=b20_9var, onvalue=1, offvalue=0)
b20_10 = ttk.Checkbutton(content, variable=b20_10var, onvalue=1, offvalue=0)
b20_11 = ttk.Checkbutton(content, variable=b20_11var, onvalue=1, offvalue=0)
b20_12 = ttk.Checkbutton(content, variable=b20_12var, onvalue=1, offvalue=0)
b20_13 = ttk.Checkbutton(content, variable=b20_13var, onvalue=1, offvalue=0)
b20_14 = ttk.Checkbutton(content, variable=b20_14var, onvalue=1, offvalue=0)
b20_15 = ttk.Checkbutton(content, variable=b20_15var, onvalue=1, offvalue=0)
b20_17 = ttk.Checkbutton(content, text="HALT", variable=b20_17var, onvalue=1, offvalue=0)
trig_21 = ttk.Checkbutton(content, variable=trig_21var, onvalue=1, offvalue=0)

b21_0 = ttk.Checkbutton(content, variable=b21_0var, onvalue=1, offvalue=0)
b21_1 = ttk.Checkbutton(content, variable=b21_1var, onvalue=1, offvalue=0)
b21_2 = ttk.Checkbutton(content, variable=b21_2var, onvalue=1, offvalue=0)
b21_3 = ttk.Checkbutton(content, variable=b21_3var, onvalue=1, offvalue=0)
b21_4 = ttk.Checkbutton(content, variable=b21_4var, onvalue=1, offvalue=0)
b21_5 = ttk.Checkbutton(content, variable=b21_5var, onvalue=1, offvalue=0)
b21_6 = ttk.Checkbutton(content, variable=b21_6var, onvalue=1, offvalue=0)
b21_7 = ttk.Checkbutton(content, variable=b21_7var, onvalue=1, offvalue=0)
b21_8 = ttk.Checkbutton(content, variable=b21_8var, onvalue=1, offvalue=0)
b21_9 = ttk.Checkbutton(content, variable=b21_9var, onvalue=1, offvalue=0)
b21_10 = ttk.Checkbutton(content, variable=b21_10var, onvalue=1, offvalue=0)
b21_11 = ttk.Checkbutton(content, variable=b21_11var, onvalue=1, offvalue=0)
b21_12 = ttk.Checkbutton(content, variable=b21_12var, onvalue=1, offvalue=0)
b21_13 = ttk.Checkbutton(content, variable=b21_13var, onvalue=1, offvalue=0)
b21_14 = ttk.Checkbutton(content, variable=b21_14var, onvalue=1, offvalue=0)
b21_15 = ttk.Checkbutton(content, variable=b21_15var, onvalue=1, offvalue=0)
b21_17 = ttk.Checkbutton(content, text="HALT", variable=b21_17var, onvalue=1, offvalue=0)
trig_22 = ttk.Checkbutton(content, variable=trig_22var, onvalue=1, offvalue=0)

b22_0 = ttk.Checkbutton(content, variable=b22_0var, onvalue=1, offvalue=0)
b22_1 = ttk.Checkbutton(content, variable=b22_1var, onvalue=1, offvalue=0)
b22_2 = ttk.Checkbutton(content, variable=b22_2var, onvalue=1, offvalue=0)
b22_3 = ttk.Checkbutton(content, variable=b22_3var, onvalue=1, offvalue=0)
b22_4 = ttk.Checkbutton(content, variable=b22_4var, onvalue=1, offvalue=0)
b22_5 = ttk.Checkbutton(content, variable=b22_5var, onvalue=1, offvalue=0)
b22_6 = ttk.Checkbutton(content, variable=b22_6var, onvalue=1, offvalue=0)
b22_7 = ttk.Checkbutton(content, variable=b22_7var, onvalue=1, offvalue=0)
b22_8 = ttk.Checkbutton(content, variable=b22_8var, onvalue=1, offvalue=0)
b22_9 = ttk.Checkbutton(content, variable=b22_9var, onvalue=1, offvalue=0)
b22_10 = ttk.Checkbutton(content, variable=b22_10var, onvalue=1, offvalue=0)
b22_11 = ttk.Checkbutton(content, variable=b22_11var, onvalue=1, offvalue=0)
b22_12 = ttk.Checkbutton(content, variable=b22_12var, onvalue=1, offvalue=0)
b22_13 = ttk.Checkbutton(content, variable=b22_13var, onvalue=1, offvalue=0)
b22_14 = ttk.Checkbutton(content, variable=b22_14var, onvalue=1, offvalue=0)
b22_15 = ttk.Checkbutton(content, variable=b22_15var, onvalue=1, offvalue=0)
b22_17 = ttk.Checkbutton(content, text="HALT", variable=b22_17var, onvalue=1, offvalue=0)
trig_23 = ttk.Checkbutton(content, variable=trig_23var, onvalue=1, offvalue=0)

b23_0 = ttk.Checkbutton(content, variable=b23_0var, onvalue=1, offvalue=0)
b23_1 = ttk.Checkbutton(content, variable=b23_1var, onvalue=1, offvalue=0)
b23_2 = ttk.Checkbutton(content, variable=b23_2var, onvalue=1, offvalue=0)
b23_3 = ttk.Checkbutton(content, variable=b23_3var, onvalue=1, offvalue=0)
b23_4 = ttk.Checkbutton(content, variable=b23_4var, onvalue=1, offvalue=0)
b23_5 = ttk.Checkbutton(content, variable=b23_5var, onvalue=1, offvalue=0)
b23_6 = ttk.Checkbutton(content, variable=b23_6var, onvalue=1, offvalue=0)
b23_7 = ttk.Checkbutton(content, variable=b23_7var, onvalue=1, offvalue=0)
b23_8 = ttk.Checkbutton(content, variable=b23_8var, onvalue=1, offvalue=0)
b23_9 = ttk.Checkbutton(content, variable=b23_9var, onvalue=1, offvalue=0)
b23_10 = ttk.Checkbutton(content, variable=b23_10var, onvalue=1, offvalue=0)
b23_11 = ttk.Checkbutton(content, variable=b23_11var, onvalue=1, offvalue=0)
b23_12 = ttk.Checkbutton(content, variable=b23_12var, onvalue=1, offvalue=0)
b23_13 = ttk.Checkbutton(content, variable=b23_13var, onvalue=1, offvalue=0)
b23_14 = ttk.Checkbutton(content, variable=b23_14var, onvalue=1, offvalue=0)
b23_15 = ttk.Checkbutton(content, variable=b23_15var, onvalue=1, offvalue=0)
b23_17 = ttk.Checkbutton(content, text="HALT", variable=b23_17var, onvalue=1, offvalue=0)
trig_24 = ttk.Checkbutton(content, variable=trig_24var, onvalue=1, offvalue=0)

# Placing text beside each beat
nameb20_0.grid(column=1, row=22)
nameb21_0.grid(column=1, row=23)
nameb22_0.grid(column=1, row=24)
nameb23_0.grid(column=1, row=25)

# Placing buttons on grid
b20_0.grid(column=2,row=22)
b20_1.grid(column=3,row=22)
b20_2.grid(column=4,row=22)
b20_3.grid(column=5,row=22)
b20_4.grid(column=6,row=22)
b20_5.grid(column=7,row=22)
b20_6.grid(column=8,row=22)
b20_7.grid(column=9,row=22)
b20_8.grid(column=10,row=22)
b20_9.grid(column=11,row=22)
b20_10.grid(column=12,row=22)
b20_11.grid(column=13,row=22)
b20_12.grid(column=14,row=22)
b20_13.grid(column=15,row=22)
b20_14.grid(column=16,row=22)
b20_15.grid(column=17,row=22)
b20_17.grid(column=19,row=22)
trig_21.grid(column=25,row=22)

b21_0.grid(column=2,row=23)
b21_1.grid(column=3,row=23)
b21_2.grid(column=4,row=23)
b21_3.grid(column=5,row=23)
b21_4.grid(column=6,row=23)
b21_5.grid(column=7,row=23)
b21_6.grid(column=8,row=23)
b21_7.grid(column=9,row=23)
b21_8.grid(column=10,row=23)
b21_9.grid(column=11,row=23)
b21_10.grid(column=12,row=23)
b21_11.grid(column=13,row=23)
b21_12.grid(column=14,row=23)
b21_13.grid(column=15,row=23)
b21_14.grid(column=16,row=23)
b21_15.grid(column=17,row=23)
b21_17.grid(column=19,row=23)
trig_22.grid(column=25,row=23)

b22_0.grid(column=2,row=24)
b22_1.grid(column=3,row=24)
b22_2.grid(column=4,row=24)
b22_3.grid(column=5,row=24)
b22_4.grid(column=6,row=24)
b22_5.grid(column=7,row=24)
b22_6.grid(column=8,row=24)
b22_7.grid(column=9,row=24)
b22_8.grid(column=10,row=24)
b22_9.grid(column=11,row=24)
b22_10.grid(column=12,row=24)
b22_11.grid(column=13,row=24)
b22_12.grid(column=14,row=24)
b22_13.grid(column=15,row=24)
b22_14.grid(column=16,row=24)
b22_15.grid(column=17,row=24)
b22_17.grid(column=19,row=24)
trig_23.grid(column=25,row=24)

b23_0.grid(column=2,row=25)
b23_1.grid(column=3,row=25)
b23_2.grid(column=4,row=25)
b23_3.grid(column=5,row=25)
b23_4.grid(column=6,row=25)
b23_5.grid(column=7,row=25)
b23_6.grid(column=8,row=25)
b23_7.grid(column=9,row=25)
b23_8.grid(column=10,row=25)
b23_9.grid(column=11,row=25)
b23_10.grid(column=12,row=25)
b23_11.grid(column=13,row=25)
b23_12.grid(column=14,row=25)
b23_13.grid(column=15,row=25)
b23_14.grid(column=16,row=25)
b23_15.grid(column=17,row=25)
b23_17.grid(column=19,row=25)
trig_24.grid(column=25,row=25)

# Group 7

# defining labels
nameb24_0 = ttk.Label(content, text="Beat 25", background=c1.get())
nameb25_0 = ttk.Label(content, text="Beat 26", background=c1.get())
nameb26_0 = ttk.Label(content, text="Beat 27", background=c1.get())
nameb27_0 = ttk.Label(content, text="Beat 28", background=c1.get())


# Defining number type
b24_0var = IntVar()
b24_1var = IntVar()
b24_2var = IntVar()
b24_3var = IntVar()
b24_4var = IntVar()
b24_5var = IntVar()
b24_6var = IntVar()
b24_7var = IntVar()
b24_8var = IntVar()
b24_9var = IntVar()
b24_10var = IntVar()
b24_11var = IntVar()
b24_12var = IntVar()
b24_13var = IntVar()
b24_14var = IntVar()
b24_15var = IntVar()
b24_17var = IntVar()
trig_25var = IntVar()

b25_0var = IntVar()
b25_1var = IntVar()
b25_2var = IntVar()
b25_3var = IntVar()
b25_4var = IntVar()
b25_5var = IntVar()
b25_6var = IntVar()
b25_7var = IntVar()
b25_8var = IntVar()
b25_9var = IntVar()
b25_10var = IntVar()
b25_11var = IntVar()
b25_12var = IntVar()
b25_13var = IntVar()
b25_14var = IntVar()
b25_15var = IntVar()
b25_17var = IntVar()
trig_26var = IntVar()

b26_0var = IntVar()
b26_1var = IntVar()
b26_2var = IntVar()
b26_3var = IntVar()
b26_4var = IntVar()
b26_5var = IntVar()
b26_6var = IntVar()
b26_7var = IntVar()
b26_8var = IntVar()
b26_9var = IntVar()
b26_10var = IntVar()
b26_11var = IntVar()
b26_12var = IntVar()
b26_13var = IntVar()
b26_14var = IntVar()
b26_15var = IntVar()
b26_17var = IntVar()
trig_27var = IntVar()

b27_0var = IntVar()
b27_1var = IntVar()
b27_2var = IntVar()
b27_3var = IntVar()
b27_4var = IntVar()
b27_5var = IntVar()
b27_6var = IntVar()
b27_7var = IntVar()
b27_8var = IntVar()
b27_9var = IntVar()
b27_10var = IntVar()
b27_11var = IntVar()
b27_12var = IntVar()
b27_13var = IntVar()
b27_14var = IntVar()
b27_15var = IntVar()
b27_17var = IntVar()
trig_28var = IntVar()

# Setting default button position
b24_0var.set(0)
b24_1var.set(0)
b24_2var.set(0)
b24_3var.set(0)
b24_4var.set(0)
b24_5var.set(0)
b24_6var.set(0)
b24_7var.set(0)
b24_8var.set(0)
b24_9var.set(0)
b24_10var.set(0)
b24_11var.set(0)
b24_12var.set(0)
b24_13var.set(0)
b24_14var.set(0)
b24_15var.set(0)
b24_17var.set(0)
trig_25var.set(0)

b25_0var.set(0)
b25_1var.set(0)
b25_2var.set(0)
b25_3var.set(0)
b25_4var.set(0)
b25_5var.set(0)
b25_6var.set(0)
b25_7var.set(0)
b25_8var.set(0)
b25_9var.set(0)
b25_10var.set(0)
b25_11var.set(0)
b25_12var.set(0)
b25_13var.set(0)
b25_14var.set(0)
b25_15var.set(0)
b25_17var.set(0)
trig_26var.set(0)

b26_0var.set(0)
b26_1var.set(0)
b26_2var.set(0)
b26_3var.set(0)
b26_4var.set(0)
b26_5var.set(0)
b26_6var.set(0)
b26_7var.set(0)
b26_8var.set(0)
b26_9var.set(0)
b26_10var.set(0)
b26_11var.set(0)
b26_12var.set(0)
b26_13var.set(0)
b26_14var.set(0)
b26_15var.set(0)
b26_17var.set(0)
trig_27var.set(0)

b27_0var.set(0)
b27_1var.set(0)
b27_2var.set(0)
b27_3var.set(0)
b27_4var.set(0)
b27_5var.set(0)
b27_6var.set(0)
b27_7var.set(0)
b27_8var.set(0)
b27_9var.set(0)
b27_10var.set(0)
b27_11var.set(0)
b27_12var.set(0)
b27_13var.set(0)
b27_14var.set(0)
b27_15var.set(0)
b27_17var.set(0)
trig_28var.set(0)

# Defining button
b24_0 = ttk.Checkbutton(content, variable=b24_0var, onvalue=1, offvalue=0)
b24_1 = ttk.Checkbutton(content, variable=b24_1var, onvalue=1, offvalue=0)
b24_2 = ttk.Checkbutton(content, variable=b24_2var, onvalue=1, offvalue=0)
b24_3 = ttk.Checkbutton(content, variable=b24_3var, onvalue=1, offvalue=0)
b24_4 = ttk.Checkbutton(content, variable=b24_4var, onvalue=1, offvalue=0)
b24_5 = ttk.Checkbutton(content, variable=b24_5var, onvalue=1, offvalue=0)
b24_6 = ttk.Checkbutton(content, variable=b24_6var, onvalue=1, offvalue=0)
b24_7 = ttk.Checkbutton(content, variable=b24_7var, onvalue=1, offvalue=0)
b24_8 = ttk.Checkbutton(content, variable=b24_8var, onvalue=1, offvalue=0)
b24_9 = ttk.Checkbutton(content, variable=b24_9var, onvalue=1, offvalue=0)
b24_10 = ttk.Checkbutton(content, variable=b24_10var, onvalue=1, offvalue=0)
b24_11 = ttk.Checkbutton(content, variable=b24_11var, onvalue=1, offvalue=0)
b24_12 = ttk.Checkbutton(content, variable=b24_12var, onvalue=1, offvalue=0)
b24_13 = ttk.Checkbutton(content, variable=b24_13var, onvalue=1, offvalue=0)
b24_14 = ttk.Checkbutton(content, variable=b24_14var, onvalue=1, offvalue=0)
b24_15 = ttk.Checkbutton(content, variable=b24_15var, onvalue=1, offvalue=0)
b24_17 = ttk.Checkbutton(content, text="HALT", variable=b24_17var, onvalue=1, offvalue=0)
trig_25 = ttk.Checkbutton(content, variable=trig_25var, onvalue=1, offvalue=0)

b25_0 = ttk.Checkbutton(content, variable=b25_0var, onvalue=1, offvalue=0)
b25_1 = ttk.Checkbutton(content, variable=b25_1var, onvalue=1, offvalue=0)
b25_2 = ttk.Checkbutton(content, variable=b25_2var, onvalue=1, offvalue=0)
b25_3 = ttk.Checkbutton(content, variable=b25_3var, onvalue=1, offvalue=0)
b25_4 = ttk.Checkbutton(content, variable=b25_4var, onvalue=1, offvalue=0)
b25_5 = ttk.Checkbutton(content, variable=b25_5var, onvalue=1, offvalue=0)
b25_6 = ttk.Checkbutton(content, variable=b25_6var, onvalue=1, offvalue=0)
b25_7 = ttk.Checkbutton(content, variable=b25_7var, onvalue=1, offvalue=0)
b25_8 = ttk.Checkbutton(content, variable=b25_8var, onvalue=1, offvalue=0)
b25_9 = ttk.Checkbutton(content, variable=b25_9var, onvalue=1, offvalue=0)
b25_10 = ttk.Checkbutton(content, variable=b25_10var, onvalue=1, offvalue=0)
b25_11 = ttk.Checkbutton(content, variable=b25_11var, onvalue=1, offvalue=0)
b25_12 = ttk.Checkbutton(content, variable=b25_12var, onvalue=1, offvalue=0)
b25_13 = ttk.Checkbutton(content, variable=b25_13var, onvalue=1, offvalue=0)
b25_14 = ttk.Checkbutton(content, variable=b25_14var, onvalue=1, offvalue=0)
b25_15 = ttk.Checkbutton(content, variable=b25_15var, onvalue=1, offvalue=0)
b25_17 = ttk.Checkbutton(content, text="HALT", variable=b25_17var, onvalue=1, offvalue=0)
trig_26 = ttk.Checkbutton(content, variable=trig_26var, onvalue=1, offvalue=0)

b26_0 = ttk.Checkbutton(content, variable=b26_0var, onvalue=1, offvalue=0)
b26_1 = ttk.Checkbutton(content, variable=b26_1var, onvalue=1, offvalue=0)
b26_2 = ttk.Checkbutton(content, variable=b26_2var, onvalue=1, offvalue=0)
b26_3 = ttk.Checkbutton(content, variable=b26_3var, onvalue=1, offvalue=0)
b26_4 = ttk.Checkbutton(content, variable=b26_4var, onvalue=1, offvalue=0)
b26_5 = ttk.Checkbutton(content, variable=b26_5var, onvalue=1, offvalue=0)
b26_6 = ttk.Checkbutton(content, variable=b26_6var, onvalue=1, offvalue=0)
b26_7 = ttk.Checkbutton(content, variable=b26_7var, onvalue=1, offvalue=0)
b26_8 = ttk.Checkbutton(content, variable=b26_8var, onvalue=1, offvalue=0)
b26_9 = ttk.Checkbutton(content, variable=b26_9var, onvalue=1, offvalue=0)
b26_10 = ttk.Checkbutton(content, variable=b26_10var, onvalue=1, offvalue=0)
b26_11 = ttk.Checkbutton(content, variable=b26_11var, onvalue=1, offvalue=0)
b26_12 = ttk.Checkbutton(content, variable=b26_12var, onvalue=1, offvalue=0)
b26_13 = ttk.Checkbutton(content, variable=b26_13var, onvalue=1, offvalue=0)
b26_14 = ttk.Checkbutton(content, variable=b26_14var, onvalue=1, offvalue=0)
b26_15 = ttk.Checkbutton(content, variable=b26_15var, onvalue=1, offvalue=0)
b26_17 = ttk.Checkbutton(content, text="HALT", variable=b26_17var, onvalue=1, offvalue=0)
trig_27 = ttk.Checkbutton(content, variable=trig_27var, onvalue=1, offvalue=0)

b27_0 = ttk.Checkbutton(content, variable=b27_0var, onvalue=1, offvalue=0)
b27_1 = ttk.Checkbutton(content, variable=b27_1var, onvalue=1, offvalue=0)
b27_2 = ttk.Checkbutton(content, variable=b27_2var, onvalue=1, offvalue=0)
b27_3 = ttk.Checkbutton(content, variable=b27_3var, onvalue=1, offvalue=0)
b27_4 = ttk.Checkbutton(content, variable=b27_4var, onvalue=1, offvalue=0)
b27_5 = ttk.Checkbutton(content, variable=b27_5var, onvalue=1, offvalue=0)
b27_6 = ttk.Checkbutton(content, variable=b27_6var, onvalue=1, offvalue=0)
b27_7 = ttk.Checkbutton(content, variable=b27_7var, onvalue=1, offvalue=0)
b27_8 = ttk.Checkbutton(content, variable=b27_8var, onvalue=1, offvalue=0)
b27_9 = ttk.Checkbutton(content, variable=b27_9var, onvalue=1, offvalue=0)
b27_10 = ttk.Checkbutton(content, variable=b27_10var, onvalue=1, offvalue=0)
b27_11 = ttk.Checkbutton(content, variable=b27_11var, onvalue=1, offvalue=0)
b27_12 = ttk.Checkbutton(content, variable=b27_12var, onvalue=1, offvalue=0)
b27_13 = ttk.Checkbutton(content, variable=b27_13var, onvalue=1, offvalue=0)
b27_14 = ttk.Checkbutton(content, variable=b27_14var, onvalue=1, offvalue=0)
b27_15 = ttk.Checkbutton(content, variable=b27_15var, onvalue=1, offvalue=0)
b27_17 = ttk.Checkbutton(content, text="HALT", variable=b27_17var, onvalue=1, offvalue=0)
trig_28 = ttk.Checkbutton(content, variable=trig_28var, onvalue=1, offvalue=0)

# Placing text beside each beat
nameb24_0.grid(column=1, row=26)
nameb25_0.grid(column=1, row=27)
nameb26_0.grid(column=1, row=28)
nameb27_0.grid(column=1, row=29)

# Placing buttons on grid
b24_0.grid(column=2,row=26)
b24_1.grid(column=3,row=26)
b24_2.grid(column=4,row=26)
b24_3.grid(column=5,row=26)
b24_4.grid(column=6,row=26)
b24_5.grid(column=7,row=26)
b24_6.grid(column=8,row=26)
b24_7.grid(column=9,row=26)
b24_8.grid(column=10,row=26)
b24_9.grid(column=11,row=26)
b24_10.grid(column=12,row=26)
b24_11.grid(column=13,row=26)
b24_12.grid(column=14,row=26)
b24_13.grid(column=15,row=26)
b24_14.grid(column=16,row=26)
b24_15.grid(column=17,row=26)
b24_17.grid(column=19,row=26)
trig_25.grid(column=25,row=26)

b25_0.grid(column=2,row=27)
b25_1.grid(column=3,row=27)
b25_2.grid(column=4,row=27)
b25_3.grid(column=5,row=27)
b25_4.grid(column=6,row=27)
b25_5.grid(column=7,row=27)
b25_6.grid(column=8,row=27)
b25_7.grid(column=9,row=27)
b25_8.grid(column=10,row=27)
b25_9.grid(column=11,row=27)
b25_10.grid(column=12,row=27)
b25_11.grid(column=13,row=27)
b25_12.grid(column=14,row=27)
b25_13.grid(column=15,row=27)
b25_14.grid(column=16,row=27)
b25_15.grid(column=17,row=27)
b25_17.grid(column=19,row=27)
trig_26.grid(column=25,row=27)

b26_0.grid(column=2,row=28)
b26_1.grid(column=3,row=28)
b26_2.grid(column=4,row=28)
b26_3.grid(column=5,row=28)
b26_4.grid(column=6,row=28)
b26_5.grid(column=7,row=28)
b26_6.grid(column=8,row=28)
b26_7.grid(column=9,row=28)
b26_8.grid(column=10,row=28)
b26_9.grid(column=11,row=28)
b26_10.grid(column=12,row=28)
b26_11.grid(column=13,row=28)
b26_12.grid(column=14,row=28)
b26_13.grid(column=15,row=28)
b26_14.grid(column=16,row=28)
b26_15.grid(column=17,row=28)
b26_17.grid(column=19,row=28)
trig_27.grid(column=25,row=28)

b27_0.grid(column=2,row=29)
b27_1.grid(column=3,row=29)
b27_2.grid(column=4,row=29)
b27_3.grid(column=5,row=29)
b27_4.grid(column=6,row=29)
b27_5.grid(column=7,row=29)
b27_6.grid(column=8,row=29)
b27_7.grid(column=9,row=29)
b27_8.grid(column=10,row=29)
b27_9.grid(column=11,row=29)
b27_10.grid(column=12,row=29)
b27_11.grid(column=13,row=29)
b27_12.grid(column=14,row=29)
b27_13.grid(column=15,row=29)
b27_14.grid(column=16,row=29)
b27_15.grid(column=17,row=29)
b27_17.grid(column=19,row=29)
trig_28.grid(column=25,row=29)

# Group 8

# defining labels
nameb28_0 = ttk.Label(content, text="Beat 29", background=c1.get())
nameb29_0 = ttk.Label(content, text="Beat 30", background=c1.get())
nameb30_0 = ttk.Label(content, text="Beat 31", background=c1.get())
nameb31_0 = ttk.Label(content, text="Beat 32", background=c1.get())


# Defining number type
b28_0var = IntVar()
b28_1var = IntVar()
b28_2var = IntVar()
b28_3var = IntVar()
b28_4var = IntVar()
b28_5var = IntVar()
b28_6var = IntVar()
b28_7var = IntVar()
b28_8var = IntVar()
b28_9var = IntVar()
b28_10var = IntVar()
b28_11var = IntVar()
b28_12var = IntVar()
b28_13var = IntVar()
b28_14var = IntVar()
b28_15var = IntVar()
b28_17var = IntVar()
trig_29var = IntVar()

b29_0var = IntVar()
b29_1var = IntVar()
b29_2var = IntVar()
b29_3var = IntVar()
b29_4var = IntVar()
b29_5var = IntVar()
b29_6var = IntVar()
b29_7var = IntVar()
b29_8var = IntVar()
b29_9var = IntVar()
b29_10var = IntVar()
b29_11var = IntVar()
b29_12var = IntVar()
b29_13var = IntVar()
b29_14var = IntVar()
b29_15var = IntVar()
b29_17var = IntVar()
trig_30var = IntVar()

b30_0var = IntVar()
b30_1var = IntVar()
b30_2var = IntVar()
b30_3var = IntVar()
b30_4var = IntVar()
b30_5var = IntVar()
b30_6var = IntVar()
b30_7var = IntVar()
b30_8var = IntVar()
b30_9var = IntVar()
b30_10var = IntVar()
b30_11var = IntVar()
b30_12var = IntVar()
b30_13var = IntVar()
b30_14var = IntVar()
b30_15var = IntVar()
b30_17var = IntVar()
trig_31var = IntVar()

b31_0var = IntVar()
b31_1var = IntVar()
b31_2var = IntVar()
b31_3var = IntVar()
b31_4var = IntVar()
b31_5var = IntVar()
b31_6var = IntVar()
b31_7var = IntVar()
b31_8var = IntVar()
b31_9var = IntVar()
b31_10var = IntVar()
b31_11var = IntVar()
b31_12var = IntVar()
b31_13var = IntVar()
b31_14var = IntVar()
b31_15var = IntVar()
b31_17var = IntVar()
trig_32var = IntVar()

# Setting default button position
b28_0var.set(0)
b28_1var.set(0)
b28_2var.set(0)
b28_3var.set(0)
b28_4var.set(0)
b28_5var.set(0)
b28_6var.set(0)
b28_7var.set(0)
b28_8var.set(0)
b28_9var.set(0)
b28_10var.set(0)
b28_11var.set(0)
b28_12var.set(0)
b28_13var.set(0)
b28_14var.set(0)
b28_15var.set(0)
b28_17var.set(0)
trig_29var.set(0)

b29_0var.set(0)
b29_1var.set(0)
b29_2var.set(0)
b29_3var.set(0)
b29_4var.set(0)
b29_5var.set(0)
b29_6var.set(0)
b29_7var.set(0)
b29_8var.set(0)
b29_9var.set(0)
b29_10var.set(0)
b29_11var.set(0)
b29_12var.set(0)
b29_13var.set(0)
b29_14var.set(0)
b29_15var.set(0)
b29_17var.set(0)
trig_30var.set(0)

b30_0var.set(0)
b30_1var.set(0)
b30_2var.set(0)
b30_3var.set(0)
b30_4var.set(0)
b30_5var.set(0)
b30_6var.set(0)
b30_7var.set(0)
b30_8var.set(0)
b30_9var.set(0)
b30_10var.set(0)
b30_11var.set(0)
b30_12var.set(0)
b30_13var.set(0)
b30_14var.set(0)
b30_15var.set(0)
b30_17var.set(0)
trig_31var.set(0)

b31_0var.set(0)
b31_1var.set(0)
b31_2var.set(0)
b31_3var.set(0)
b31_4var.set(0)
b31_5var.set(0)
b31_6var.set(0)
b31_7var.set(0)
b31_8var.set(0)
b31_9var.set(0)
b31_10var.set(0)
b31_11var.set(0)
b31_12var.set(0)
b31_13var.set(0)
b31_14var.set(0)
b31_15var.set(0)
b31_17var.set(0)
trig_32var.set(0)

# Defining button
b28_0 = ttk.Checkbutton(content, variable=b28_0var, onvalue=1, offvalue=0)
b28_1 = ttk.Checkbutton(content, variable=b28_1var, onvalue=1, offvalue=0)
b28_2 = ttk.Checkbutton(content, variable=b28_2var, onvalue=1, offvalue=0)
b28_3 = ttk.Checkbutton(content, variable=b28_3var, onvalue=1, offvalue=0)
b28_4 = ttk.Checkbutton(content, variable=b28_4var, onvalue=1, offvalue=0)
b28_5 = ttk.Checkbutton(content, variable=b28_5var, onvalue=1, offvalue=0)
b28_6 = ttk.Checkbutton(content, variable=b28_6var, onvalue=1, offvalue=0)
b28_7 = ttk.Checkbutton(content, variable=b28_7var, onvalue=1, offvalue=0)
b28_8 = ttk.Checkbutton(content, variable=b28_8var, onvalue=1, offvalue=0)
b28_9 = ttk.Checkbutton(content, variable=b28_9var, onvalue=1, offvalue=0)
b28_10 = ttk.Checkbutton(content, variable=b28_10var, onvalue=1, offvalue=0)
b28_11 = ttk.Checkbutton(content, variable=b28_11var, onvalue=1, offvalue=0)
b28_12 = ttk.Checkbutton(content, variable=b28_12var, onvalue=1, offvalue=0)
b28_13 = ttk.Checkbutton(content, variable=b28_13var, onvalue=1, offvalue=0)
b28_14 = ttk.Checkbutton(content, variable=b28_14var, onvalue=1, offvalue=0)
b28_15 = ttk.Checkbutton(content, variable=b28_15var, onvalue=1, offvalue=0)
b28_17 = ttk.Checkbutton(content, text="HALT", variable=b28_17var, onvalue=1, offvalue=0)
trig_29 = ttk.Checkbutton(content, variable=trig_29var, onvalue=1, offvalue=0)

b29_0 = ttk.Checkbutton(content, variable=b29_0var, onvalue=1, offvalue=0)
b29_1 = ttk.Checkbutton(content, variable=b29_1var, onvalue=1, offvalue=0)
b29_2 = ttk.Checkbutton(content, variable=b29_2var, onvalue=1, offvalue=0)
b29_3 = ttk.Checkbutton(content, variable=b29_3var, onvalue=1, offvalue=0)
b29_4 = ttk.Checkbutton(content, variable=b29_4var, onvalue=1, offvalue=0)
b29_5 = ttk.Checkbutton(content, variable=b29_5var, onvalue=1, offvalue=0)
b29_6 = ttk.Checkbutton(content, variable=b29_6var, onvalue=1, offvalue=0)
b29_7 = ttk.Checkbutton(content, variable=b29_7var, onvalue=1, offvalue=0)
b29_8 = ttk.Checkbutton(content, variable=b29_8var, onvalue=1, offvalue=0)
b29_9 = ttk.Checkbutton(content, variable=b29_9var, onvalue=1, offvalue=0)
b29_10 = ttk.Checkbutton(content, variable=b29_10var, onvalue=1, offvalue=0)
b29_11 = ttk.Checkbutton(content, variable=b29_11var, onvalue=1, offvalue=0)
b29_12 = ttk.Checkbutton(content, variable=b29_12var, onvalue=1, offvalue=0)
b29_13 = ttk.Checkbutton(content, variable=b29_13var, onvalue=1, offvalue=0)
b29_14 = ttk.Checkbutton(content, variable=b29_14var, onvalue=1, offvalue=0)
b29_15 = ttk.Checkbutton(content, variable=b29_15var, onvalue=1, offvalue=0)
b29_17 = ttk.Checkbutton(content, text="HALT", variable=b29_17var, onvalue=1, offvalue=0)
trig_30 = ttk.Checkbutton(content, variable=trig_30var, onvalue=1, offvalue=0)

b30_0 = ttk.Checkbutton(content, variable=b30_0var, onvalue=1, offvalue=0)
b30_1 = ttk.Checkbutton(content, variable=b30_1var, onvalue=1, offvalue=0)
b30_2 = ttk.Checkbutton(content, variable=b30_2var, onvalue=1, offvalue=0)
b30_3 = ttk.Checkbutton(content, variable=b30_3var, onvalue=1, offvalue=0)
b30_4 = ttk.Checkbutton(content, variable=b30_4var, onvalue=1, offvalue=0)
b30_5 = ttk.Checkbutton(content, variable=b30_5var, onvalue=1, offvalue=0)
b30_6 = ttk.Checkbutton(content, variable=b30_6var, onvalue=1, offvalue=0)
b30_7 = ttk.Checkbutton(content, variable=b30_7var, onvalue=1, offvalue=0)
b30_8 = ttk.Checkbutton(content, variable=b30_8var, onvalue=1, offvalue=0)
b30_9 = ttk.Checkbutton(content, variable=b30_9var, onvalue=1, offvalue=0)
b30_10 = ttk.Checkbutton(content, variable=b30_10var, onvalue=1, offvalue=0)
b30_11 = ttk.Checkbutton(content, variable=b30_11var, onvalue=1, offvalue=0)
b30_12 = ttk.Checkbutton(content, variable=b30_12var, onvalue=1, offvalue=0)
b30_13 = ttk.Checkbutton(content, variable=b30_13var, onvalue=1, offvalue=0)
b30_14 = ttk.Checkbutton(content, variable=b30_14var, onvalue=1, offvalue=0)
b30_15 = ttk.Checkbutton(content, variable=b30_15var, onvalue=1, offvalue=0)
b30_17 = ttk.Checkbutton(content, text="HALT", variable=b30_17var, onvalue=1, offvalue=0)
trig_31 = ttk.Checkbutton(content, variable=trig_31var, onvalue=1, offvalue=0)

b31_0 = ttk.Checkbutton(content, variable=b31_0var, onvalue=1, offvalue=0)
b31_1 = ttk.Checkbutton(content, variable=b31_1var, onvalue=1, offvalue=0)
b31_2 = ttk.Checkbutton(content, variable=b31_2var, onvalue=1, offvalue=0)
b31_3 = ttk.Checkbutton(content, variable=b31_3var, onvalue=1, offvalue=0)
b31_4 = ttk.Checkbutton(content, variable=b31_4var, onvalue=1, offvalue=0)
b31_5 = ttk.Checkbutton(content, variable=b31_5var, onvalue=1, offvalue=0)
b31_6 = ttk.Checkbutton(content, variable=b31_6var, onvalue=1, offvalue=0)
b31_7 = ttk.Checkbutton(content, variable=b31_7var, onvalue=1, offvalue=0)
b31_8 = ttk.Checkbutton(content, variable=b31_8var, onvalue=1, offvalue=0)
b31_9 = ttk.Checkbutton(content, variable=b31_9var, onvalue=1, offvalue=0)
b31_10 = ttk.Checkbutton(content, variable=b31_10var, onvalue=1, offvalue=0)
b31_11 = ttk.Checkbutton(content, variable=b31_11var, onvalue=1, offvalue=0)
b31_12 = ttk.Checkbutton(content, variable=b31_12var, onvalue=1, offvalue=0)
b31_13 = ttk.Checkbutton(content, variable=b31_13var, onvalue=1, offvalue=0)
b31_14 = ttk.Checkbutton(content, variable=b31_14var, onvalue=1, offvalue=0)
b31_15 = ttk.Checkbutton(content, variable=b31_15var, onvalue=1, offvalue=0)
b31_17 = ttk.Checkbutton(content, text="HALT", variable=b31_17var, onvalue=1, offvalue=0)
trig_32 = ttk.Checkbutton(content, variable=trig_32var, onvalue=1, offvalue=0)

# Placing text beside each beat
nameb28_0.grid(column=1, row=30)
nameb29_0.grid(column=1, row=31)
nameb30_0.grid(column=1, row=32)
nameb31_0.grid(column=1, row=33)

# Placing buttons on grid
b28_0.grid(column=2,row=30)
b28_1.grid(column=3,row=30)
b28_2.grid(column=4,row=30)
b28_3.grid(column=5,row=30)
b28_4.grid(column=6,row=30)
b28_5.grid(column=7,row=30)
b28_6.grid(column=8,row=30)
b28_7.grid(column=9,row=30)
b28_8.grid(column=10,row=30)
b28_9.grid(column=11,row=30)
b28_10.grid(column=12,row=30)
b28_11.grid(column=13,row=30)
b28_12.grid(column=14,row=30)
b28_13.grid(column=15,row=30)
b28_14.grid(column=16,row=30)
b28_15.grid(column=17,row=30)
b28_17.grid(column=19,row=30)
trig_29.grid(column=25,row=30)

b29_0.grid(column=2,row=31)
b29_1.grid(column=3,row=31)
b29_2.grid(column=4,row=31)
b29_3.grid(column=5,row=31)
b29_4.grid(column=6,row=31)
b29_5.grid(column=7,row=31)
b29_6.grid(column=8,row=31)
b29_7.grid(column=9,row=31)
b29_8.grid(column=10,row=31)
b29_9.grid(column=11,row=31)
b29_10.grid(column=12,row=31)
b29_11.grid(column=13,row=31)
b29_12.grid(column=14,row=31)
b29_13.grid(column=15,row=31)
b29_14.grid(column=16,row=31)
b29_15.grid(column=17,row=31)
b29_17.grid(column=19,row=31)
trig_30.grid(column=25,row=31)

b30_0.grid(column=2,row=32)
b30_1.grid(column=3,row=32)
b30_2.grid(column=4,row=32)
b30_3.grid(column=5,row=32)
b30_4.grid(column=6,row=32)
b30_5.grid(column=7,row=32)
b30_6.grid(column=8,row=32)
b30_7.grid(column=9,row=32)
b30_8.grid(column=10,row=32)
b30_9.grid(column=11,row=32)
b30_10.grid(column=12,row=32)
b30_11.grid(column=13,row=32)
b30_12.grid(column=14,row=32)
b30_13.grid(column=15,row=32)
b30_14.grid(column=16,row=32)
b30_15.grid(column=17,row=32)
b30_17.grid(column=19,row=32)
trig_31.grid(column=25,row=32)

b31_0.grid(column=2,row=33)
b31_1.grid(column=3,row=33)
b31_2.grid(column=4,row=33)
b31_3.grid(column=5,row=33)
b31_4.grid(column=6,row=33)
b31_5.grid(column=7,row=33)
b31_6.grid(column=8,row=33)
b31_7.grid(column=9,row=33)
b31_8.grid(column=10,row=33)
b31_9.grid(column=11,row=33)
b31_10.grid(column=12,row=33)
b31_11.grid(column=13,row=33)
b31_12.grid(column=14,row=33)
b31_13.grid(column=15,row=33)
b31_14.grid(column=16,row=33)
b31_15.grid(column=17,row=33)
b31_17.grid(column=19,row=33)
trig_32.grid(column=25,row=33)

#Group 9

# defining labels
nameb32_0 = ttk.Label(content, text="Beat 33", background=c1.get())
nameb33_0 = ttk.Label(content, text="Beat 34", background=c1.get())
nameb34_0 = ttk.Label(content, text="Beat 35", background=c1.get())
nameb35_0 = ttk.Label(content, text="Beat 36", background=c1.get())

# Defining number type
b32_0var = IntVar()
b32_1var = IntVar()
b32_2var = IntVar()
b32_3var = IntVar()
b32_4var = IntVar()
b32_5var = IntVar()
b32_6var = IntVar()
b32_7var = IntVar()
b32_8var = IntVar()
b32_9var = IntVar()
b32_10var = IntVar()
b32_11var = IntVar()
b32_12var = IntVar()
b32_13var = IntVar()
b32_14var = IntVar()
b32_15var = IntVar()
b32_17var = IntVar()
trig_33var = IntVar()

b33_0var = IntVar()
b33_1var = IntVar()
b33_2var = IntVar()
b33_3var = IntVar()
b33_4var = IntVar()
b33_5var = IntVar()
b33_6var = IntVar()
b33_7var = IntVar()
b33_8var = IntVar()
b33_9var = IntVar()
b33_10var = IntVar()
b33_11var = IntVar()
b33_12var = IntVar()
b33_13var = IntVar()
b33_14var = IntVar()
b33_15var = IntVar()
b33_17var = IntVar()
trig_34var = IntVar()

b34_0var = IntVar()
b34_1var = IntVar()
b34_2var = IntVar()
b34_3var = IntVar()
b34_4var = IntVar()
b34_5var = IntVar()
b34_6var = IntVar()
b34_7var = IntVar()
b34_8var = IntVar()
b34_9var = IntVar()
b34_10var = IntVar()
b34_11var = IntVar()
b34_12var = IntVar()
b34_13var = IntVar()
b34_14var = IntVar()
b34_15var = IntVar()
b34_17var = IntVar()
trig_35var = IntVar()

b35_0var = IntVar()
b35_1var = IntVar()
b35_2var = IntVar()
b35_3var = IntVar()
b35_4var = IntVar()
b35_5var = IntVar()
b35_6var = IntVar()
b35_7var = IntVar()
b35_8var = IntVar()
b35_9var = IntVar()
b35_10var = IntVar()
b35_11var = IntVar()
b35_12var = IntVar()
b35_13var = IntVar()
b35_14var = IntVar()
b35_15var = IntVar()
b35_17var = IntVar()
trig_36var = IntVar()

# setting default button position
b32_0var.set(0)
b32_1var.set(0)
b32_2var.set(0)
b32_3var.set(0)
b32_4var.set(0)
b32_5var.set(0)
b32_6var.set(0)
b32_7var.set(0)
b32_8var.set(0)
b32_9var.set(0)
b32_10var.set(0)
b32_11var.set(0)
b32_12var.set(0)
b32_13var.set(0)
b32_14var.set(0)
b32_15var.set(0)
b32_17var.set(0)
trig_33var.set(0)

b33_0var.set(0)
b33_1var.set(0)
b33_2var.set(0)
b33_3var.set(0)
b33_4var.set(0)
b33_5var.set(0)
b33_6var.set(0)
b33_7var.set(0)
b33_8var.set(0)
b33_9var.set(0)
b33_10var.set(0)
b33_11var.set(0)
b33_12var.set(0)
b33_13var.set(0)
b33_14var.set(0)
b33_15var.set(0)
b33_17var.set(0)
trig_34var.set(0)

b34_0var.set(0)
b34_1var.set(0)
b34_2var.set(0)
b34_3var.set(0)
b34_4var.set(0)
b34_5var.set(0)
b34_6var.set(0)
b34_7var.set(0)
b34_8var.set(0)
b34_9var.set(0)
b34_10var.set(0)
b34_11var.set(0)
b34_12var.set(0)
b34_13var.set(0)
b34_14var.set(0)
b34_15var.set(0)
b34_17var.set(0)
trig_35var.set(0)

b35_0var.set(0)
b35_1var.set(0)
b35_2var.set(0)
b35_3var.set(0)
b35_4var.set(0)
b35_5var.set(0)
b35_6var.set(0)
b35_7var.set(0)
b35_8var.set(0)
b35_9var.set(0)
b35_10var.set(0)
b35_11var.set(0)
b35_12var.set(0)
b35_13var.set(0)
b35_14var.set(0)
b35_15var.set(0)
b35_17var.set(0)
trig_36var.set(0)

# defining button

b32_0 = ttk.Checkbutton(content, variable=b32_0var, onvalue=1, offvalue=0)
b32_1 = ttk.Checkbutton(content, variable=b32_1var, onvalue=1, offvalue=0)
b32_2 = ttk.Checkbutton(content, variable=b32_2var, onvalue=1, offvalue=0)
b32_3 = ttk.Checkbutton(content, variable=b32_3var, onvalue=1, offvalue=0)
b32_4 = ttk.Checkbutton(content, variable=b32_4var, onvalue=1, offvalue=0)
b32_5 = ttk.Checkbutton(content, variable=b32_5var, onvalue=1, offvalue=0)
b32_6 = ttk.Checkbutton(content, variable=b32_6var, onvalue=1, offvalue=0)
b32_7 = ttk.Checkbutton(content, variable=b32_7var, onvalue=1, offvalue=0)
b32_8 = ttk.Checkbutton(content, variable=b32_8var, onvalue=1, offvalue=0)
b32_9 = ttk.Checkbutton(content, variable=b32_9var, onvalue=1, offvalue=0)
b32_10 = ttk.Checkbutton(content, variable=b32_10var, onvalue=1, offvalue=0)
b32_11 = ttk.Checkbutton(content, variable=b32_11var, onvalue=1, offvalue=0)
b32_12 = ttk.Checkbutton(content, variable=b32_12var, onvalue=1, offvalue=0)
b32_13 = ttk.Checkbutton(content, variable=b32_13var, onvalue=1, offvalue=0)
b32_14 = ttk.Checkbutton(content, variable=b32_14var, onvalue=1, offvalue=0)
b32_15 = ttk.Checkbutton(content, variable=b32_15var, onvalue=1, offvalue=0)
b32_17 = ttk.Checkbutton(content, text="HALT", variable=b32_17var, onvalue=1, offvalue=0)
trig_33 = ttk.Checkbutton(content, variable=trig_33var, onvalue=1, offvalue=0)

b33_0 = ttk.Checkbutton(content, variable=b33_0var, onvalue=1, offvalue=0)
b33_1 = ttk.Checkbutton(content, variable=b33_1var, onvalue=1, offvalue=0)
b33_2 = ttk.Checkbutton(content, variable=b33_2var, onvalue=1, offvalue=0)
b33_3 = ttk.Checkbutton(content, variable=b33_3var, onvalue=1, offvalue=0)
b33_4 = ttk.Checkbutton(content, variable=b33_4var, onvalue=1, offvalue=0)
b33_5 = ttk.Checkbutton(content, variable=b33_5var, onvalue=1, offvalue=0)
b33_6 = ttk.Checkbutton(content, variable=b33_6var, onvalue=1, offvalue=0)
b33_7 = ttk.Checkbutton(content, variable=b33_7var, onvalue=1, offvalue=0)
b33_8 = ttk.Checkbutton(content, variable=b33_8var, onvalue=1, offvalue=0)
b33_9 = ttk.Checkbutton(content, variable=b33_9var, onvalue=1, offvalue=0)
b33_10 = ttk.Checkbutton(content, variable=b33_10var, onvalue=1, offvalue=0)
b33_11 = ttk.Checkbutton(content, variable=b33_11var, onvalue=1, offvalue=0)
b33_12 = ttk.Checkbutton(content, variable=b33_12var, onvalue=1, offvalue=0)
b33_13 = ttk.Checkbutton(content, variable=b33_13var, onvalue=1, offvalue=0)
b33_14 = ttk.Checkbutton(content, variable=b33_14var, onvalue=1, offvalue=0)
b33_15 = ttk.Checkbutton(content, variable=b33_15var, onvalue=1, offvalue=0)
b33_17 = ttk.Checkbutton(content, text="HALT", variable=b33_17var, onvalue=1, offvalue=0)
trig_34 = ttk.Checkbutton(content, variable=trig_34var, onvalue=1, offvalue=0)

b34_0 = ttk.Checkbutton(content, variable=b34_0var, onvalue=1, offvalue=0)
b34_1 = ttk.Checkbutton(content, variable=b34_1var, onvalue=1, offvalue=0)
b34_2 = ttk.Checkbutton(content, variable=b34_2var, onvalue=1, offvalue=0)
b34_3 = ttk.Checkbutton(content, variable=b34_3var, onvalue=1, offvalue=0)
b34_4 = ttk.Checkbutton(content, variable=b34_4var, onvalue=1, offvalue=0)
b34_5 = ttk.Checkbutton(content, variable=b34_5var, onvalue=1, offvalue=0)
b34_6 = ttk.Checkbutton(content, variable=b34_6var, onvalue=1, offvalue=0)
b34_7 = ttk.Checkbutton(content, variable=b34_7var, onvalue=1, offvalue=0)
b34_8 = ttk.Checkbutton(content, variable=b34_8var, onvalue=1, offvalue=0)
b34_9 = ttk.Checkbutton(content, variable=b34_9var, onvalue=1, offvalue=0)
b34_10 = ttk.Checkbutton(content, variable=b34_10var, onvalue=1, offvalue=0)
b34_11 = ttk.Checkbutton(content, variable=b34_11var, onvalue=1, offvalue=0)
b34_12 = ttk.Checkbutton(content, variable=b34_12var, onvalue=1, offvalue=0)
b34_13 = ttk.Checkbutton(content, variable=b34_13var, onvalue=1, offvalue=0)
b34_14 = ttk.Checkbutton(content, variable=b34_14var, onvalue=1, offvalue=0)
b34_15 = ttk.Checkbutton(content, variable=b34_15var, onvalue=1, offvalue=0)
b34_17 = ttk.Checkbutton(content, text="HALT", variable=b34_17var, onvalue=1, offvalue=0)
trig_35 = ttk.Checkbutton(content, variable=trig_35var, onvalue=1, offvalue=0)

b35_0 = ttk.Checkbutton(content, variable=b35_0var, onvalue=1, offvalue=0)
b35_1 = ttk.Checkbutton(content, variable=b35_1var, onvalue=1, offvalue=0)
b35_2 = ttk.Checkbutton(content, variable=b35_2var, onvalue=1, offvalue=0)
b35_3 = ttk.Checkbutton(content, variable=b35_3var, onvalue=1, offvalue=0)
b35_4 = ttk.Checkbutton(content, variable=b35_4var, onvalue=1, offvalue=0)
b35_5 = ttk.Checkbutton(content, variable=b35_5var, onvalue=1, offvalue=0)
b35_6 = ttk.Checkbutton(content, variable=b35_6var, onvalue=1, offvalue=0)
b35_7 = ttk.Checkbutton(content, variable=b35_7var, onvalue=1, offvalue=0)
b35_8 = ttk.Checkbutton(content, variable=b35_8var, onvalue=1, offvalue=0)
b35_9 = ttk.Checkbutton(content, variable=b35_9var, onvalue=1, offvalue=0)
b35_10 = ttk.Checkbutton(content, variable=b35_10var, onvalue=1, offvalue=0)
b35_11 = ttk.Checkbutton(content, variable=b35_11var, onvalue=1, offvalue=0)
b35_12 = ttk.Checkbutton(content, variable=b35_12var, onvalue=1, offvalue=0)
b35_13 = ttk.Checkbutton(content, variable=b35_13var, onvalue=1, offvalue=0)
b35_14 = ttk.Checkbutton(content, variable=b35_14var, onvalue=1, offvalue=0)
b35_15 = ttk.Checkbutton(content, variable=b35_15var, onvalue=1, offvalue=0)
b35_17 = ttk.Checkbutton(content, text="HALT", variable=b35_17var, onvalue=1, offvalue=0)
trig_36 = ttk.Checkbutton(content, variable=trig_36var, onvalue=1, offvalue=0)

# placing text beside each beat
nameb32_0.grid(column=1, row=34)
nameb33_0.grid(column=1, row=35)
nameb34_0.grid(column=1, row=36)
nameb35_0.grid(column=1, row=37)


# placing buttons on grid
b32_0.grid(column=2,row=34)
b32_1.grid(column=3,row=34)
b32_2.grid(column=4,row=34)
b32_3.grid(column=5,row=34)
b32_4.grid(column=6,row=34)
b32_5.grid(column=7,row=34)
b32_6.grid(column=8,row=34)
b32_7.grid(column=9,row=34)
b32_8.grid(column=10,row=34)
b32_9.grid(column=11,row=34)
b32_10.grid(column=12,row=34)
b32_11.grid(column=13,row=34)
b32_12.grid(column=14,row=34)
b32_13.grid(column=15,row=34)
b32_14.grid(column=16,row=34)
b32_15.grid(column=17,row=34)
b32_17.grid(column=19,row=34)
trig_33.grid(column=25,row=34)

b33_0.grid(column=2,row=35)
b33_1.grid(column=3,row=35)
b33_2.grid(column=4,row=35)
b33_3.grid(column=5,row=35)
b33_4.grid(column=6,row=35)
b33_5.grid(column=7,row=35)
b33_6.grid(column=8,row=35)
b33_7.grid(column=9,row=35)
b33_8.grid(column=10,row=35)
b33_9.grid(column=11,row=35)
b33_10.grid(column=12,row=35)
b33_11.grid(column=13,row=35)
b33_12.grid(column=14,row=35)
b33_13.grid(column=15,row=35)
b33_14.grid(column=16,row=35)
b33_15.grid(column=17,row=35)
b33_17.grid(column=19,row=35)
trig_34.grid(column=25,row=35)

b34_0.grid(column=2,row=36)
b34_1.grid(column=3,row=36)
b34_2.grid(column=4,row=36)
b34_3.grid(column=5,row=36)
b34_4.grid(column=6,row=36)
b34_5.grid(column=7,row=36)
b34_6.grid(column=8,row=36)
b34_7.grid(column=9,row=36)
b34_8.grid(column=10,row=36)
b34_9.grid(column=11,row=36)
b34_10.grid(column=12,row=36)
b34_11.grid(column=13,row=36)
b34_12.grid(column=14,row=36)
b34_13.grid(column=15,row=36)
b34_14.grid(column=16,row=36)
b34_15.grid(column=17,row=36)
b34_17.grid(column=19,row=36)
trig_35.grid(column=25,row=36)

b35_0.grid(column=2,row=37)
b35_1.grid(column=3,row=37)
b35_2.grid(column=4,row=37)
b35_3.grid(column=5,row=37)
b35_4.grid(column=6,row=37)
b35_5.grid(column=7,row=37)
b35_6.grid(column=8,row=37)
b35_7.grid(column=9,row=37)
b35_8.grid(column=10,row=37)
b35_9.grid(column=11,row=37)
b35_10.grid(column=12,row=37)
b35_11.grid(column=13,row=37)
b35_12.grid(column=14,row=37)
b35_13.grid(column=15,row=37)
b35_14.grid(column=16,row=37)
b35_15.grid(column=17,row=37)
b35_17.grid(column=19,row=37)
trig_36.grid(column=25,row=37)

# group 10

# defining labels
nameb36_0 = ttk.Label(content, text="Beat 37", background=c1.get())
nameb37_0 = ttk.Label(content, text="Beat 38", background=c1.get())
nameb38_0 = ttk.Label(content, text="Beat 39", background=c1.get())
nameb39_0 = ttk.Label(content, text="Beat 40", background=c1.get())


# Defining number type
b36_0var = IntVar()
b36_1var = IntVar()
b36_2var = IntVar()
b36_3var = IntVar()
b36_4var = IntVar()
b36_5var = IntVar()
b36_6var = IntVar()
b36_7var = IntVar()
b36_8var = IntVar()
b36_9var = IntVar()
b36_10var = IntVar()
b36_11var = IntVar()
b36_12var = IntVar()
b36_13var = IntVar()
b36_14var = IntVar()
b36_15var = IntVar()
b36_17var = IntVar()
trig_37var = IntVar()

b37_0var = IntVar()
b37_1var = IntVar()
b37_2var = IntVar()
b37_3var = IntVar()
b37_4var = IntVar()
b37_5var = IntVar()
b37_6var = IntVar()
b37_7var = IntVar()
b37_8var = IntVar()
b37_9var = IntVar()
b37_10var = IntVar()
b37_11var = IntVar()
b37_12var = IntVar()
b37_13var = IntVar()
b37_14var = IntVar()
b37_15var = IntVar()
b37_17var = IntVar()
trig_38var = IntVar()

b38_0var = IntVar()
b38_1var = IntVar()
b38_2var = IntVar()
b38_3var = IntVar()
b38_4var = IntVar()
b38_5var = IntVar()
b38_6var = IntVar()
b38_7var = IntVar()
b38_8var = IntVar()
b38_9var = IntVar()
b38_10var = IntVar()
b38_11var = IntVar()
b38_12var = IntVar()
b38_13var = IntVar()
b38_14var = IntVar()
b38_15var = IntVar()
b38_17var = IntVar()
trig_39var = IntVar()

b39_0var = IntVar()
b39_1var = IntVar()
b39_2var = IntVar()
b39_3var = IntVar()
b39_4var = IntVar()
b39_5var = IntVar()
b39_6var = IntVar()
b39_7var = IntVar()
b39_8var = IntVar()
b39_9var = IntVar()
b39_10var = IntVar()
b39_11var = IntVar()
b39_12var = IntVar()
b39_13var = IntVar()
b39_14var = IntVar()
b39_15var = IntVar()
b39_17var = IntVar()
trig_40var = IntVar()

# Setting default button position
b36_0var.set(0)
b36_1var.set(0)
b36_2var.set(0)
b36_3var.set(0)
b36_4var.set(0)
b36_5var.set(0)
b36_6var.set(0)
b36_7var.set(0)
b36_8var.set(0)
b36_9var.set(0)
b36_10var.set(0)
b36_11var.set(0)
b36_12var.set(0)
b36_13var.set(0)
b36_14var.set(0)
b36_15var.set(0)
b36_17var.set(0)
trig_37var.set(0)

b37_0var.set(0)
b37_1var.set(0)
b37_2var.set(0)
b37_3var.set(0)
b37_4var.set(0)
b37_5var.set(0)
b37_6var.set(0)
b37_7var.set(0)
b37_8var.set(0)
b37_9var.set(0)
b37_10var.set(0)
b37_11var.set(0)
b37_12var.set(0)
b37_13var.set(0)
b37_14var.set(0)
b37_15var.set(0)
b37_17var.set(0)
trig_38var.set(0)

b38_0var.set(0)
b38_1var.set(0)
b38_2var.set(0)
b38_3var.set(0)
b38_4var.set(0)
b38_5var.set(0)
b38_6var.set(0)
b38_7var.set(0)
b38_8var.set(0)
b38_9var.set(0)
b38_10var.set(0)
b38_11var.set(0)
b38_12var.set(0)
b38_13var.set(0)
b38_14var.set(0)
b38_15var.set(0)
b38_17var.set(0)
trig_39var.set(0)

b39_0var.set(0)
b39_1var.set(0)
b39_2var.set(0)
b39_3var.set(0)
b39_4var.set(0)
b39_5var.set(0)
b39_6var.set(0)
b39_7var.set(0)
b39_8var.set(0)
b39_9var.set(0)
b39_10var.set(0)
b39_11var.set(0)
b39_12var.set(0)
b39_13var.set(0)
b39_14var.set(0)
b39_15var.set(0)
b39_17var.set(0)
trig_40var.set(0)

# Defining button
b36_0 = ttk.Checkbutton(content, variable=b36_0var, onvalue=1, offvalue=0)
b36_1 = ttk.Checkbutton(content, variable=b36_1var, onvalue=1, offvalue=0)
b36_2 = ttk.Checkbutton(content, variable=b36_2var, onvalue=1, offvalue=0)
b36_3 = ttk.Checkbutton(content, variable=b36_3var, onvalue=1, offvalue=0)
b36_4 = ttk.Checkbutton(content, variable=b36_4var, onvalue=1, offvalue=0)
b36_5 = ttk.Checkbutton(content, variable=b36_5var, onvalue=1, offvalue=0)
b36_6 = ttk.Checkbutton(content, variable=b36_6var, onvalue=1, offvalue=0)
b36_7 = ttk.Checkbutton(content, variable=b36_7var, onvalue=1, offvalue=0)
b36_8 = ttk.Checkbutton(content, variable=b36_8var, onvalue=1, offvalue=0)
b36_9 = ttk.Checkbutton(content, variable=b36_9var, onvalue=1, offvalue=0)
b36_10 = ttk.Checkbutton(content, variable=b36_10var, onvalue=1, offvalue=0)
b36_11 = ttk.Checkbutton(content, variable=b36_11var, onvalue=1, offvalue=0)
b36_12 = ttk.Checkbutton(content, variable=b36_12var, onvalue=1, offvalue=0)
b36_13 = ttk.Checkbutton(content, variable=b36_13var, onvalue=1, offvalue=0)
b36_14 = ttk.Checkbutton(content, variable=b36_14var, onvalue=1, offvalue=0)
b36_15 = ttk.Checkbutton(content, variable=b36_15var, onvalue=1, offvalue=0)
b36_17 = ttk.Checkbutton(content, text="HALT", variable=b36_17var, onvalue=1, offvalue=0)
trig_37 = ttk.Checkbutton(content, variable=trig_37var, onvalue=1, offvalue=0)

b37_0 = ttk.Checkbutton(content, variable=b37_0var, onvalue=1, offvalue=0)
b37_1 = ttk.Checkbutton(content, variable=b37_1var, onvalue=1, offvalue=0)
b37_2 = ttk.Checkbutton(content, variable=b37_2var, onvalue=1, offvalue=0)
b37_3 = ttk.Checkbutton(content, variable=b37_3var, onvalue=1, offvalue=0)
b37_4 = ttk.Checkbutton(content, variable=b37_4var, onvalue=1, offvalue=0)
b37_5 = ttk.Checkbutton(content, variable=b37_5var, onvalue=1, offvalue=0)
b37_6 = ttk.Checkbutton(content, variable=b37_6var, onvalue=1, offvalue=0)
b37_7 = ttk.Checkbutton(content, variable=b37_7var, onvalue=1, offvalue=0)
b37_8 = ttk.Checkbutton(content, variable=b37_8var, onvalue=1, offvalue=0)
b37_9 = ttk.Checkbutton(content, variable=b37_9var, onvalue=1, offvalue=0)
b37_10 = ttk.Checkbutton(content, variable=b37_10var, onvalue=1, offvalue=0)
b37_11 = ttk.Checkbutton(content, variable=b37_11var, onvalue=1, offvalue=0)
b37_12 = ttk.Checkbutton(content, variable=b37_12var, onvalue=1, offvalue=0)
b37_13 = ttk.Checkbutton(content, variable=b37_13var, onvalue=1, offvalue=0)
b37_14 = ttk.Checkbutton(content, variable=b37_14var, onvalue=1, offvalue=0)
b37_15 = ttk.Checkbutton(content, variable=b37_15var, onvalue=1, offvalue=0)
b37_17 = ttk.Checkbutton(content, text="HALT", variable=b37_17var, onvalue=1, offvalue=0)
trig_38 = ttk.Checkbutton(content, variable=trig_38var, onvalue=1, offvalue=0)

b38_0 = ttk.Checkbutton(content, variable=b38_0var, onvalue=1, offvalue=0)
b38_1 = ttk.Checkbutton(content, variable=b38_1var, onvalue=1, offvalue=0)
b38_2 = ttk.Checkbutton(content, variable=b38_2var, onvalue=1, offvalue=0)
b38_3 = ttk.Checkbutton(content, variable=b38_3var, onvalue=1, offvalue=0)
b38_4 = ttk.Checkbutton(content, variable=b38_4var, onvalue=1, offvalue=0)
b38_5 = ttk.Checkbutton(content, variable=b38_5var, onvalue=1, offvalue=0)
b38_6 = ttk.Checkbutton(content, variable=b38_6var, onvalue=1, offvalue=0)
b38_7 = ttk.Checkbutton(content, variable=b38_7var, onvalue=1, offvalue=0)
b38_8 = ttk.Checkbutton(content, variable=b38_8var, onvalue=1, offvalue=0)
b38_9 = ttk.Checkbutton(content, variable=b38_9var, onvalue=1, offvalue=0)
b38_10 = ttk.Checkbutton(content, variable=b38_10var, onvalue=1, offvalue=0)
b38_11 = ttk.Checkbutton(content, variable=b38_11var, onvalue=1, offvalue=0)
b38_12 = ttk.Checkbutton(content, variable=b38_12var, onvalue=1, offvalue=0)
b38_13 = ttk.Checkbutton(content, variable=b38_13var, onvalue=1, offvalue=0)
b38_14 = ttk.Checkbutton(content, variable=b38_14var, onvalue=1, offvalue=0)
b38_15 = ttk.Checkbutton(content, variable=b38_15var, onvalue=1, offvalue=0)
b38_17 = ttk.Checkbutton(content, text="HALT", variable=b38_17var, onvalue=1, offvalue=0)
trig_39 = ttk.Checkbutton(content, variable=trig_39var, onvalue=1, offvalue=0)

b39_0 = ttk.Checkbutton(content, variable=b39_0var, onvalue=1, offvalue=0)
b39_1 = ttk.Checkbutton(content, variable=b39_1var, onvalue=1, offvalue=0)
b39_2 = ttk.Checkbutton(content, variable=b39_2var, onvalue=1, offvalue=0)
b39_3 = ttk.Checkbutton(content, variable=b39_3var, onvalue=1, offvalue=0)
b39_4 = ttk.Checkbutton(content, variable=b39_4var, onvalue=1, offvalue=0)
b39_5 = ttk.Checkbutton(content, variable=b39_5var, onvalue=1, offvalue=0)
b39_6 = ttk.Checkbutton(content, variable=b39_6var, onvalue=1, offvalue=0)
b39_7 = ttk.Checkbutton(content, variable=b39_7var, onvalue=1, offvalue=0)
b39_8 = ttk.Checkbutton(content, variable=b39_8var, onvalue=1, offvalue=0)
b39_9 = ttk.Checkbutton(content, variable=b39_9var, onvalue=1, offvalue=0)
b39_10 = ttk.Checkbutton(content, variable=b39_10var, onvalue=1, offvalue=0)
b39_11 = ttk.Checkbutton(content, variable=b39_11var, onvalue=1, offvalue=0)
b39_12 = ttk.Checkbutton(content, variable=b39_12var, onvalue=1, offvalue=0)
b39_13 = ttk.Checkbutton(content, variable=b39_13var, onvalue=1, offvalue=0)
b39_14 = ttk.Checkbutton(content, variable=b39_14var, onvalue=1, offvalue=0)
b39_15 = ttk.Checkbutton(content, variable=b39_15var, onvalue=1, offvalue=0)
b39_17 = ttk.Checkbutton(content, text="HALT", variable=b39_17var, onvalue=1, offvalue=0)
trig_40 = ttk.Checkbutton(content, variable=trig_40var, onvalue=1, offvalue=0)

# Placing text beside each beat
nameb36_0.grid(column=1, row=38)
nameb37_0.grid(column=1, row=39)
nameb38_0.grid(column=1, row=40)
nameb39_0.grid(column=1, row=41)

# Placing buttons on grid
b36_0.grid(column=2,row=38)
b36_1.grid(column=3,row=38)
b36_2.grid(column=4,row=38)
b36_3.grid(column=5,row=38)
b36_4.grid(column=6,row=38)
b36_5.grid(column=7,row=38)
b36_6.grid(column=8,row=38)
b36_7.grid(column=9,row=38)
b36_8.grid(column=10,row=38)
b36_9.grid(column=11,row=38)
b36_10.grid(column=12,row=38)
b36_11.grid(column=13,row=38)
b36_12.grid(column=14,row=38)
b36_13.grid(column=15,row=38)
b36_14.grid(column=16,row=38)
b36_15.grid(column=17,row=38)
b36_17.grid(column=19,row=38)
trig_37.grid(column=25,row=38)

b37_0.grid(column=2,row=39)
b37_1.grid(column=3,row=39)
b37_2.grid(column=4,row=39)
b37_3.grid(column=5,row=39)
b37_4.grid(column=6,row=39)
b37_5.grid(column=7,row=39)
b37_6.grid(column=8,row=39)
b37_7.grid(column=9,row=39)
b37_8.grid(column=10,row=39)
b37_9.grid(column=11,row=39)
b37_10.grid(column=12,row=39)
b37_11.grid(column=13,row=39)
b37_12.grid(column=14,row=39)
b37_13.grid(column=15,row=39)
b37_14.grid(column=16,row=39)
b37_15.grid(column=17,row=39)
b37_17.grid(column=19,row=39)
trig_38.grid(column=25,row=39)

b38_0.grid(column=2,row=40)
b38_1.grid(column=3,row=40)
b38_2.grid(column=4,row=40)
b38_3.grid(column=5,row=40)
b38_4.grid(column=6,row=40)
b38_5.grid(column=7,row=40)
b38_6.grid(column=8,row=40)
b38_7.grid(column=9,row=40)
b38_8.grid(column=10,row=40)
b38_9.grid(column=11,row=40)
b38_10.grid(column=12,row=40)
b38_11.grid(column=13,row=40)
b38_12.grid(column=14,row=40)
b38_13.grid(column=15,row=40)
b38_14.grid(column=16,row=40)
b38_15.grid(column=17,row=40)
b38_17.grid(column=19,row=40)
trig_39.grid(column=25,row=40)

b39_0.grid(column=2,row=41)
b39_1.grid(column=3,row=41)
b39_2.grid(column=4,row=41)
b39_3.grid(column=5,row=41)
b39_4.grid(column=6,row=41)
b39_5.grid(column=7,row=41)
b39_6.grid(column=8,row=41)
b39_7.grid(column=9,row=41)
b39_8.grid(column=10,row=41)
b39_9.grid(column=11,row=41)
b39_10.grid(column=12,row=41)
b39_11.grid(column=13,row=41)
b39_12.grid(column=14,row=41)
b39_13.grid(column=15,row=41)
b39_14.grid(column=16,row=41)
b39_15.grid(column=17,row=41)
b39_17.grid(column=19,row=41)
trig_40.grid(column=25,row=41)

# group 11

# defining labels
nameb40_0 = ttk.Label(content, text="Beat 41", background=c1.get())
nameb41_0 = ttk.Label(content, text="Beat 42", background=c1.get())
nameb42_0 = ttk.Label(content, text="Beat 43", background=c1.get())
nameb43_0 = ttk.Label(content, text="Beat 44", background=c1.get())


# Defining number type
b40_0var = IntVar()
b40_1var = IntVar()
b40_2var = IntVar()
b40_3var = IntVar()
b40_4var = IntVar()
b40_5var = IntVar()
b40_6var = IntVar()
b40_7var = IntVar()
b40_8var = IntVar()
b40_9var = IntVar()
b40_10var = IntVar()
b40_11var = IntVar()
b40_12var = IntVar()
b40_13var = IntVar()
b40_14var = IntVar()
b40_15var = IntVar()
b40_17var = IntVar()
trig_41var = IntVar()

b41_0var = IntVar()
b41_1var = IntVar()
b41_2var = IntVar()
b41_3var = IntVar()
b41_4var = IntVar()
b41_5var = IntVar()
b41_6var = IntVar()
b41_7var = IntVar()
b41_8var = IntVar()
b41_9var = IntVar()
b41_10var = IntVar()
b41_11var = IntVar()
b41_12var = IntVar()
b41_13var = IntVar()
b41_14var = IntVar()
b41_15var = IntVar()
b41_17var = IntVar()
trig_42var = IntVar()

b42_0var = IntVar()
b42_1var = IntVar()
b42_2var = IntVar()
b42_3var = IntVar()
b42_4var = IntVar()
b42_5var = IntVar()
b42_6var = IntVar()
b42_7var = IntVar()
b42_8var = IntVar()
b42_9var = IntVar()
b42_10var = IntVar()
b42_11var = IntVar()
b42_12var = IntVar()
b42_13var = IntVar()
b42_14var = IntVar()
b42_15var = IntVar()
b42_17var = IntVar()
trig_43var = IntVar()

b43_0var = IntVar()
b43_1var = IntVar()
b43_2var = IntVar()
b43_3var = IntVar()
b43_4var = IntVar()
b43_5var = IntVar()
b43_6var = IntVar()
b43_7var = IntVar()
b43_8var = IntVar()
b43_9var = IntVar()
b43_10var = IntVar()
b43_11var = IntVar()
b43_12var = IntVar()
b43_13var = IntVar()
b43_14var = IntVar()
b43_15var = IntVar()
b43_17var = IntVar()
trig_44var = IntVar()

# Setting default button position
b40_0var.set(0)
b40_1var.set(0)
b40_2var.set(0)
b40_3var.set(0)
b40_4var.set(0)
b40_5var.set(0)
b40_6var.set(0)
b40_7var.set(0)
b40_8var.set(0)
b40_9var.set(0)
b40_10var.set(0)
b40_11var.set(0)
b40_12var.set(0)
b40_13var.set(0)
b40_14var.set(0)
b40_15var.set(0)
b40_17var.set(0)
trig_41var.set(0)

b41_0var.set(0)
b41_1var.set(0)
b41_2var.set(0)
b41_3var.set(0)
b41_4var.set(0)
b41_5var.set(0)
b41_6var.set(0)
b41_7var.set(0)
b41_8var.set(0)
b41_9var.set(0)
b41_10var.set(0)
b41_11var.set(0)
b41_12var.set(0)
b41_13var.set(0)
b41_14var.set(0)
b41_15var.set(0)
b41_17var.set(0)
trig_42var.set(0)

b42_0var.set(0)
b42_1var.set(0)
b42_2var.set(0)
b42_3var.set(0)
b42_4var.set(0)
b42_5var.set(0)
b42_6var.set(0)
b42_7var.set(0)
b42_8var.set(0)
b42_9var.set(0)
b42_10var.set(0)
b42_11var.set(0)
b42_12var.set(0)
b42_13var.set(0)
b42_14var.set(0)
b42_15var.set(0)
b42_17var.set(0)
trig_43var.set(0)

b43_0var.set(0)
b43_1var.set(0)
b43_2var.set(0)
b43_3var.set(0)
b43_4var.set(0)
b43_5var.set(0)
b43_6var.set(0)
b43_7var.set(0)
b43_8var.set(0)
b43_9var.set(0)
b43_10var.set(0)
b43_11var.set(0)
b43_12var.set(0)
b43_13var.set(0)
b43_14var.set(0)
b43_15var.set(0)
b43_17var.set(0)
trig_44var.set(0)

# Defining button
b40_0 = ttk.Checkbutton(content, variable=b40_0var, onvalue=1, offvalue=0)
b40_1 = ttk.Checkbutton(content, variable=b40_1var, onvalue=1, offvalue=0)
b40_2 = ttk.Checkbutton(content, variable=b40_2var, onvalue=1, offvalue=0)
b40_3 = ttk.Checkbutton(content, variable=b40_3var, onvalue=1, offvalue=0)
b40_4 = ttk.Checkbutton(content, variable=b40_4var, onvalue=1, offvalue=0)
b40_5 = ttk.Checkbutton(content, variable=b40_5var, onvalue=1, offvalue=0)
b40_6 = ttk.Checkbutton(content, variable=b40_6var, onvalue=1, offvalue=0)
b40_7 = ttk.Checkbutton(content, variable=b40_7var, onvalue=1, offvalue=0)
b40_8 = ttk.Checkbutton(content, variable=b40_8var, onvalue=1, offvalue=0)
b40_9 = ttk.Checkbutton(content, variable=b40_9var, onvalue=1, offvalue=0)
b40_10 = ttk.Checkbutton(content, variable=b40_10var, onvalue=1, offvalue=0)
b40_11 = ttk.Checkbutton(content, variable=b40_11var, onvalue=1, offvalue=0)
b40_12 = ttk.Checkbutton(content, variable=b40_12var, onvalue=1, offvalue=0)
b40_13 = ttk.Checkbutton(content, variable=b40_13var, onvalue=1, offvalue=0)
b40_14 = ttk.Checkbutton(content, variable=b40_14var, onvalue=1, offvalue=0)
b40_15 = ttk.Checkbutton(content, variable=b40_15var, onvalue=1, offvalue=0)
b40_17 = ttk.Checkbutton(content, text="HALT", variable=b40_17var, onvalue=1, offvalue=0)
trig_41 = ttk.Checkbutton(content, variable=trig_41var, onvalue=1, offvalue=0)

b41_0 = ttk.Checkbutton(content, variable=b41_0var, onvalue=1, offvalue=0)
b41_1 = ttk.Checkbutton(content, variable=b41_1var, onvalue=1, offvalue=0)
b41_2 = ttk.Checkbutton(content, variable=b41_2var, onvalue=1, offvalue=0)
b41_3 = ttk.Checkbutton(content, variable=b41_3var, onvalue=1, offvalue=0)
b41_4 = ttk.Checkbutton(content, variable=b41_4var, onvalue=1, offvalue=0)
b41_5 = ttk.Checkbutton(content, variable=b41_5var, onvalue=1, offvalue=0)
b41_6 = ttk.Checkbutton(content, variable=b41_6var, onvalue=1, offvalue=0)
b41_7 = ttk.Checkbutton(content, variable=b41_7var, onvalue=1, offvalue=0)
b41_8 = ttk.Checkbutton(content, variable=b41_8var, onvalue=1, offvalue=0)
b41_9 = ttk.Checkbutton(content, variable=b41_9var, onvalue=1, offvalue=0)
b41_10 = ttk.Checkbutton(content, variable=b41_10var, onvalue=1, offvalue=0)
b41_11 = ttk.Checkbutton(content, variable=b41_11var, onvalue=1, offvalue=0)
b41_12 = ttk.Checkbutton(content, variable=b41_12var, onvalue=1, offvalue=0)
b41_13 = ttk.Checkbutton(content, variable=b41_13var, onvalue=1, offvalue=0)
b41_14 = ttk.Checkbutton(content, variable=b41_14var, onvalue=1, offvalue=0)
b41_15 = ttk.Checkbutton(content, variable=b41_15var, onvalue=1, offvalue=0)
b41_17 = ttk.Checkbutton(content, text="HALT", variable=b41_17var, onvalue=1, offvalue=0)
trig_42 = ttk.Checkbutton(content, variable=trig_42var, onvalue=1, offvalue=0)

b42_0 = ttk.Checkbutton(content, variable=b42_0var, onvalue=1, offvalue=0)
b42_1 = ttk.Checkbutton(content, variable=b42_1var, onvalue=1, offvalue=0)
b42_2 = ttk.Checkbutton(content, variable=b42_2var, onvalue=1, offvalue=0)
b42_3 = ttk.Checkbutton(content, variable=b42_3var, onvalue=1, offvalue=0)
b42_4 = ttk.Checkbutton(content, variable=b42_4var, onvalue=1, offvalue=0)
b42_5 = ttk.Checkbutton(content, variable=b42_5var, onvalue=1, offvalue=0)
b42_6 = ttk.Checkbutton(content, variable=b42_6var, onvalue=1, offvalue=0)
b42_7 = ttk.Checkbutton(content, variable=b42_7var, onvalue=1, offvalue=0)
b42_8 = ttk.Checkbutton(content, variable=b42_8var, onvalue=1, offvalue=0)
b42_9 = ttk.Checkbutton(content, variable=b42_9var, onvalue=1, offvalue=0)
b42_10 = ttk.Checkbutton(content, variable=b42_10var, onvalue=1, offvalue=0)
b42_11 = ttk.Checkbutton(content, variable=b42_11var, onvalue=1, offvalue=0)
b42_12 = ttk.Checkbutton(content, variable=b42_12var, onvalue=1, offvalue=0)
b42_13 = ttk.Checkbutton(content, variable=b42_13var, onvalue=1, offvalue=0)
b42_14 = ttk.Checkbutton(content, variable=b42_14var, onvalue=1, offvalue=0)
b42_15 = ttk.Checkbutton(content, variable=b42_15var, onvalue=1, offvalue=0)
b42_17 = ttk.Checkbutton(content, text="HALT", variable=b42_17var, onvalue=1, offvalue=0)
trig_43 = ttk.Checkbutton(content, variable=trig_43var, onvalue=1, offvalue=0)

b43_0 = ttk.Checkbutton(content, variable=b43_0var, onvalue=1, offvalue=0)
b43_1 = ttk.Checkbutton(content, variable=b43_1var, onvalue=1, offvalue=0)
b43_2 = ttk.Checkbutton(content, variable=b43_2var, onvalue=1, offvalue=0)
b43_3 = ttk.Checkbutton(content, variable=b43_3var, onvalue=1, offvalue=0)
b43_4 = ttk.Checkbutton(content, variable=b43_4var, onvalue=1, offvalue=0)
b43_5 = ttk.Checkbutton(content, variable=b43_5var, onvalue=1, offvalue=0)
b43_6 = ttk.Checkbutton(content, variable=b43_6var, onvalue=1, offvalue=0)
b43_7 = ttk.Checkbutton(content, variable=b43_7var, onvalue=1, offvalue=0)
b43_8 = ttk.Checkbutton(content, variable=b43_8var, onvalue=1, offvalue=0)
b43_9 = ttk.Checkbutton(content, variable=b43_9var, onvalue=1, offvalue=0)
b43_10 = ttk.Checkbutton(content, variable=b43_10var, onvalue=1, offvalue=0)
b43_11 = ttk.Checkbutton(content, variable=b43_11var, onvalue=1, offvalue=0)
b43_12 = ttk.Checkbutton(content, variable=b43_12var, onvalue=1, offvalue=0)
b43_13 = ttk.Checkbutton(content, variable=b43_13var, onvalue=1, offvalue=0)
b43_14 = ttk.Checkbutton(content, variable=b43_14var, onvalue=1, offvalue=0)
b43_15 = ttk.Checkbutton(content, variable=b43_15var, onvalue=1, offvalue=0)
b43_17 = ttk.Checkbutton(content, text="HALT", variable=b43_17var, onvalue=1, offvalue=0)
trig_44 = ttk.Checkbutton(content, variable=trig_44var, onvalue=1, offvalue=0)

# Placing text beside each beat
nameb40_0.grid(column=1, row=42)
nameb41_0.grid(column=1, row=43)
nameb42_0.grid(column=1, row=44)
nameb43_0.grid(column=1, row=45)

# Placing buttons on grid
b40_0.grid(column=2,row=42)
b40_1.grid(column=3,row=42)
b40_2.grid(column=4,row=42)
b40_3.grid(column=5,row=42)
b40_4.grid(column=6,row=42)
b40_5.grid(column=7,row=42)
b40_6.grid(column=8,row=42)
b40_7.grid(column=9,row=42)
b40_8.grid(column=10,row=42)
b40_9.grid(column=11,row=42)
b40_10.grid(column=12,row=42)
b40_11.grid(column=13,row=42)
b40_12.grid(column=14,row=42)
b40_13.grid(column=15,row=42)
b40_14.grid(column=16,row=42)
b40_15.grid(column=17,row=42)
b40_17.grid(column=19,row=42)
trig_41.grid(column=25,row=42)

b41_0.grid(column=2,row=43)
b41_1.grid(column=3,row=43)
b41_2.grid(column=4,row=43)
b41_3.grid(column=5,row=43)
b41_4.grid(column=6,row=43)
b41_5.grid(column=7,row=43)
b41_6.grid(column=8,row=43)
b41_7.grid(column=9,row=43)
b41_8.grid(column=10,row=43)
b41_9.grid(column=11,row=43)
b41_10.grid(column=12,row=43)
b41_11.grid(column=13,row=43)
b41_12.grid(column=14,row=43)
b41_13.grid(column=15,row=43)
b41_14.grid(column=16,row=43)
b41_15.grid(column=17,row=43)
b41_17.grid(column=19,row=43)
trig_42.grid(column=25,row=43)

b42_0.grid(column=2,row=44)
b42_1.grid(column=3,row=44)
b42_2.grid(column=4,row=44)
b42_3.grid(column=5,row=44)
b42_4.grid(column=6,row=44)
b42_5.grid(column=7,row=44)
b42_6.grid(column=8,row=44)
b42_7.grid(column=9,row=44)
b42_8.grid(column=10,row=44)
b42_9.grid(column=11,row=44)
b42_10.grid(column=12,row=44)
b42_11.grid(column=13,row=44)
b42_12.grid(column=14,row=44)
b42_13.grid(column=15,row=44)
b42_14.grid(column=16,row=44)
b42_15.grid(column=17,row=44)
b42_17.grid(column=19,row=44)
trig_43.grid(column=25,row=44)

b43_0.grid(column=2,row=45)
b43_1.grid(column=3,row=45)
b43_2.grid(column=4,row=45)
b43_3.grid(column=5,row=45)
b43_4.grid(column=6,row=45)
b43_5.grid(column=7,row=45)
b43_6.grid(column=8,row=45)
b43_7.grid(column=9,row=45)
b43_8.grid(column=10,row=45)
b43_9.grid(column=11,row=45)
b43_10.grid(column=12,row=45)
b43_11.grid(column=13,row=45)
b43_12.grid(column=14,row=45)
b43_13.grid(column=15,row=45)
b43_14.grid(column=16,row=45)
b43_15.grid(column=17,row=45)
b43_17.grid(column=19,row=45)
trig_44.grid(column=25,row=45)

# Group 12

# defining labels
nameb44_0 = ttk.Label(content, text="Beat 45", background=c1.get())
nameb45_0 = ttk.Label(content, text="Beat 46", background=c1.get())
nameb46_0 = ttk.Label(content, text="Beat 47", background=c1.get())
nameb47_0 = ttk.Label(content, text="Beat 48", background=c1.get())


# Defining number type
b44_0var = IntVar()
b44_1var = IntVar()
b44_2var = IntVar()
b44_3var = IntVar()
b44_4var = IntVar()
b44_5var = IntVar()
b44_6var = IntVar()
b44_7var = IntVar()
b44_8var = IntVar()
b44_9var = IntVar()
b44_10var = IntVar()
b44_11var = IntVar()
b44_12var = IntVar()
b44_13var = IntVar()
b44_14var = IntVar()
b44_15var = IntVar()
b44_17var = IntVar()
trig_45var = IntVar()

b45_0var = IntVar()
b45_1var = IntVar()
b45_2var = IntVar()
b45_3var = IntVar()
b45_4var = IntVar()
b45_5var = IntVar()
b45_6var = IntVar()
b45_7var = IntVar()
b45_8var = IntVar()
b45_9var = IntVar()
b45_10var = IntVar()
b45_11var = IntVar()
b45_12var = IntVar()
b45_13var = IntVar()
b45_14var = IntVar()
b45_15var = IntVar()
b45_17var = IntVar()
trig_46var = IntVar()

b46_0var = IntVar()
b46_1var = IntVar()
b46_2var = IntVar()
b46_3var = IntVar()
b46_4var = IntVar()
b46_5var = IntVar()
b46_6var = IntVar()
b46_7var = IntVar()
b46_8var = IntVar()
b46_9var = IntVar()
b46_10var = IntVar()
b46_11var = IntVar()
b46_12var = IntVar()
b46_13var = IntVar()
b46_14var = IntVar()
b46_15var = IntVar()
b46_17var = IntVar()
trig_47var = IntVar()

b47_0var = IntVar()
b47_1var = IntVar()
b47_2var = IntVar()
b47_3var = IntVar()
b47_4var = IntVar()
b47_5var = IntVar()
b47_6var = IntVar()
b47_7var = IntVar()
b47_8var = IntVar()
b47_9var = IntVar()
b47_10var = IntVar()
b47_11var = IntVar()
b47_12var = IntVar()
b47_13var = IntVar()
b47_14var = IntVar()
b47_15var = IntVar()
b47_17var = IntVar()
trig_48var = IntVar()

# Setting default button position
b44_0var.set(0)
b44_1var.set(0)
b44_2var.set(0)
b44_3var.set(0)
b44_4var.set(0)
b44_5var.set(0)
b44_6var.set(0)
b44_7var.set(0)
b44_8var.set(0)
b44_9var.set(0)
b44_10var.set(0)
b44_11var.set(0)
b44_12var.set(0)
b44_13var.set(0)
b44_14var.set(0)
b44_15var.set(0)
b44_17var.set(0)
trig_45var.set(0)

b45_0var.set(0)
b45_1var.set(0)
b45_2var.set(0)
b45_3var.set(0)
b45_4var.set(0)
b45_5var.set(0)
b45_6var.set(0)
b45_7var.set(0)
b45_8var.set(0)
b45_9var.set(0)
b45_10var.set(0)
b45_11var.set(0)
b45_12var.set(0)
b45_13var.set(0)
b45_14var.set(0)
b45_15var.set(0)
b45_17var.set(0)
trig_46var.set(0)

b46_0var.set(0)
b46_1var.set(0)
b46_2var.set(0)
b46_3var.set(0)
b46_4var.set(0)
b46_5var.set(0)
b46_6var.set(0)
b46_7var.set(0)
b46_8var.set(0)
b46_9var.set(0)
b46_10var.set(0)
b46_11var.set(0)
b46_12var.set(0)
b46_13var.set(0)
b46_14var.set(0)
b46_15var.set(0)
b46_17var.set(0)
trig_47var.set(0)

b47_0var.set(0)
b47_1var.set(0)
b47_2var.set(0)
b47_3var.set(0)
b47_4var.set(0)
b47_5var.set(0)
b47_6var.set(0)
b47_7var.set(0)
b47_8var.set(0)
b47_9var.set(0)
b47_10var.set(0)
b47_11var.set(0)
b47_12var.set(0)
b47_13var.set(0)
b47_14var.set(0)
b47_15var.set(0)
b47_17var.set(0)
trig_48var.set(0)

# Defining button
b44_0 = ttk.Checkbutton(content, variable=b44_0var, onvalue=1, offvalue=0)
b44_1 = ttk.Checkbutton(content, variable=b44_1var, onvalue=1, offvalue=0)
b44_2 = ttk.Checkbutton(content, variable=b44_2var, onvalue=1, offvalue=0)
b44_3 = ttk.Checkbutton(content, variable=b44_3var, onvalue=1, offvalue=0)
b44_4 = ttk.Checkbutton(content, variable=b44_4var, onvalue=1, offvalue=0)
b44_5 = ttk.Checkbutton(content, variable=b44_5var, onvalue=1, offvalue=0)
b44_6 = ttk.Checkbutton(content, variable=b44_6var, onvalue=1, offvalue=0)
b44_7 = ttk.Checkbutton(content, variable=b44_7var, onvalue=1, offvalue=0)
b44_8 = ttk.Checkbutton(content, variable=b44_8var, onvalue=1, offvalue=0)
b44_9 = ttk.Checkbutton(content, variable=b44_9var, onvalue=1, offvalue=0)
b44_10 = ttk.Checkbutton(content, variable=b44_10var, onvalue=1, offvalue=0)
b44_11 = ttk.Checkbutton(content, variable=b44_11var, onvalue=1, offvalue=0)
b44_12 = ttk.Checkbutton(content, variable=b44_12var, onvalue=1, offvalue=0)
b44_13 = ttk.Checkbutton(content, variable=b44_13var, onvalue=1, offvalue=0)
b44_14 = ttk.Checkbutton(content, variable=b44_14var, onvalue=1, offvalue=0)
b44_15 = ttk.Checkbutton(content, variable=b44_15var, onvalue=1, offvalue=0)
b44_17 = ttk.Checkbutton(content, text="HALT", variable=b44_17var, onvalue=1, offvalue=0)
trig_45 = ttk.Checkbutton(content, variable=trig_45var, onvalue=1, offvalue=0)

b45_0 = ttk.Checkbutton(content, variable=b45_0var, onvalue=1, offvalue=0)
b45_1 = ttk.Checkbutton(content, variable=b45_1var, onvalue=1, offvalue=0)
b45_2 = ttk.Checkbutton(content, variable=b45_2var, onvalue=1, offvalue=0)
b45_3 = ttk.Checkbutton(content, variable=b45_3var, onvalue=1, offvalue=0)
b45_4 = ttk.Checkbutton(content, variable=b45_4var, onvalue=1, offvalue=0)
b45_5 = ttk.Checkbutton(content, variable=b45_5var, onvalue=1, offvalue=0)
b45_6 = ttk.Checkbutton(content, variable=b45_6var, onvalue=1, offvalue=0)
b45_7 = ttk.Checkbutton(content, variable=b45_7var, onvalue=1, offvalue=0)
b45_8 = ttk.Checkbutton(content, variable=b45_8var, onvalue=1, offvalue=0)
b45_9 = ttk.Checkbutton(content, variable=b45_9var, onvalue=1, offvalue=0)
b45_10 = ttk.Checkbutton(content, variable=b45_10var, onvalue=1, offvalue=0)
b45_11 = ttk.Checkbutton(content, variable=b45_11var, onvalue=1, offvalue=0)
b45_12 = ttk.Checkbutton(content, variable=b45_12var, onvalue=1, offvalue=0)
b45_13 = ttk.Checkbutton(content, variable=b45_13var, onvalue=1, offvalue=0)
b45_14 = ttk.Checkbutton(content, variable=b45_14var, onvalue=1, offvalue=0)
b45_15 = ttk.Checkbutton(content, variable=b45_15var, onvalue=1, offvalue=0)
b45_17 = ttk.Checkbutton(content, text="HALT", variable=b45_17var, onvalue=1, offvalue=0)
trig_46 = ttk.Checkbutton(content, variable=trig_46var, onvalue=1, offvalue=0)

b46_0 = ttk.Checkbutton(content, variable=b46_0var, onvalue=1, offvalue=0)
b46_1 = ttk.Checkbutton(content, variable=b46_1var, onvalue=1, offvalue=0)
b46_2 = ttk.Checkbutton(content, variable=b46_2var, onvalue=1, offvalue=0)
b46_3 = ttk.Checkbutton(content, variable=b46_3var, onvalue=1, offvalue=0)
b46_4 = ttk.Checkbutton(content, variable=b46_4var, onvalue=1, offvalue=0)
b46_5 = ttk.Checkbutton(content, variable=b46_5var, onvalue=1, offvalue=0)
b46_6 = ttk.Checkbutton(content, variable=b46_6var, onvalue=1, offvalue=0)
b46_7 = ttk.Checkbutton(content, variable=b46_7var, onvalue=1, offvalue=0)
b46_8 = ttk.Checkbutton(content, variable=b46_8var, onvalue=1, offvalue=0)
b46_9 = ttk.Checkbutton(content, variable=b46_9var, onvalue=1, offvalue=0)
b46_10 = ttk.Checkbutton(content, variable=b46_10var, onvalue=1, offvalue=0)
b46_11 = ttk.Checkbutton(content, variable=b46_11var, onvalue=1, offvalue=0)
b46_12 = ttk.Checkbutton(content, variable=b46_12var, onvalue=1, offvalue=0)
b46_13 = ttk.Checkbutton(content, variable=b46_13var, onvalue=1, offvalue=0)
b46_14 = ttk.Checkbutton(content, variable=b46_14var, onvalue=1, offvalue=0)
b46_15 = ttk.Checkbutton(content, variable=b46_15var, onvalue=1, offvalue=0)
b46_17 = ttk.Checkbutton(content, text="HALT", variable=b46_17var, onvalue=1, offvalue=0)
trig_47 = ttk.Checkbutton(content, variable=trig_47var, onvalue=1, offvalue=0)

b47_0 = ttk.Checkbutton(content, variable=b47_0var, onvalue=1, offvalue=0)
b47_1 = ttk.Checkbutton(content, variable=b47_1var, onvalue=1, offvalue=0)
b47_2 = ttk.Checkbutton(content, variable=b47_2var, onvalue=1, offvalue=0)
b47_3 = ttk.Checkbutton(content, variable=b47_3var, onvalue=1, offvalue=0)
b47_4 = ttk.Checkbutton(content, variable=b47_4var, onvalue=1, offvalue=0)
b47_5 = ttk.Checkbutton(content, variable=b47_5var, onvalue=1, offvalue=0)
b47_6 = ttk.Checkbutton(content, variable=b47_6var, onvalue=1, offvalue=0)
b47_7 = ttk.Checkbutton(content, variable=b47_7var, onvalue=1, offvalue=0)
b47_8 = ttk.Checkbutton(content, variable=b47_8var, onvalue=1, offvalue=0)
b47_9 = ttk.Checkbutton(content, variable=b47_9var, onvalue=1, offvalue=0)
b47_10 = ttk.Checkbutton(content, variable=b47_10var, onvalue=1, offvalue=0)
b47_11 = ttk.Checkbutton(content, variable=b47_11var, onvalue=1, offvalue=0)
b47_12 = ttk.Checkbutton(content, variable=b47_12var, onvalue=1, offvalue=0)
b47_13 = ttk.Checkbutton(content, variable=b47_13var, onvalue=1, offvalue=0)
b47_14 = ttk.Checkbutton(content, variable=b47_14var, onvalue=1, offvalue=0)
b47_15 = ttk.Checkbutton(content, variable=b47_15var, onvalue=1, offvalue=0)
b47_17 = ttk.Checkbutton(content, text="HALT", variable=b47_17var, onvalue=1, offvalue=0)
trig_48 = ttk.Checkbutton(content, variable=trig_48var, onvalue=1, offvalue=0)

# Placing text beside each beat
nameb44_0.grid(column=1, row=46)
nameb45_0.grid(column=1, row=47)
nameb46_0.grid(column=1, row=48)
nameb47_0.grid(column=1, row=49)

# Placing buttons on grid
b44_0.grid(column=2,row=46)
b44_1.grid(column=3,row=46)
b44_2.grid(column=4,row=46)
b44_3.grid(column=5,row=46)
b44_4.grid(column=6,row=46)
b44_5.grid(column=7,row=46)
b44_6.grid(column=8,row=46)
b44_7.grid(column=9,row=46)
b44_8.grid(column=10,row=46)
b44_9.grid(column=11,row=46)
b44_10.grid(column=12,row=46)
b44_11.grid(column=13,row=46)
b44_12.grid(column=14,row=46)
b44_13.grid(column=15,row=46)
b44_14.grid(column=16,row=46)
b44_15.grid(column=17,row=46)
b44_17.grid(column=19,row=46)
trig_45.grid(column=25,row=46)

b45_0.grid(column=2,row=47)
b45_1.grid(column=3,row=47)
b45_2.grid(column=4,row=47)
b45_3.grid(column=5,row=47)
b45_4.grid(column=6,row=47)
b45_5.grid(column=7,row=47)
b45_6.grid(column=8,row=47)
b45_7.grid(column=9,row=47)
b45_8.grid(column=10,row=47)
b45_9.grid(column=11,row=47)
b45_10.grid(column=12,row=47)
b45_11.grid(column=13,row=47)
b45_12.grid(column=14,row=47)
b45_13.grid(column=15,row=47)
b45_14.grid(column=16,row=47)
b45_15.grid(column=17,row=47)
b45_17.grid(column=19,row=47)
trig_46.grid(column=25,row=47)

b46_0.grid(column=2,row=48)
b46_1.grid(column=3,row=48)
b46_2.grid(column=4,row=48)
b46_3.grid(column=5,row=48)
b46_4.grid(column=6,row=48)
b46_5.grid(column=7,row=48)
b46_6.grid(column=8,row=48)
b46_7.grid(column=9,row=48)
b46_8.grid(column=10,row=48)
b46_9.grid(column=11,row=48)
b46_10.grid(column=12,row=48)
b46_11.grid(column=13,row=48)
b46_12.grid(column=14,row=48)
b46_13.grid(column=15,row=48)
b46_14.grid(column=16,row=48)
b46_15.grid(column=17,row=48)
b46_17.grid(column=19,row=48)
trig_47.grid(column=25,row=48)

b47_0.grid(column=2,row=49)
b47_1.grid(column=3,row=49)
b47_2.grid(column=4,row=49)
b47_3.grid(column=5,row=49)
b47_4.grid(column=6,row=49)
b47_5.grid(column=7,row=49)
b47_6.grid(column=8,row=49)
b47_7.grid(column=9,row=49)
b47_8.grid(column=10,row=49)
b47_9.grid(column=11,row=49)
b47_10.grid(column=12,row=49)
b47_11.grid(column=13,row=49)
b47_12.grid(column=14,row=49)
b47_13.grid(column=15,row=49)
b47_14.grid(column=16,row=49)
b47_15.grid(column=17,row=49)
b47_17.grid(column=19,row=49)
trig_48.grid(column=25,row=49)

# Group 13

# defining labels
nameb48_0 = ttk.Label(content, text="Beat 49", background=c1.get())
nameb49_0 = ttk.Label(content, text="Beat 50", background=c1.get())
nameb50_0 = ttk.Label(content, text="Beat 51", background=c1.get())
nameb51_0 = ttk.Label(content, text="Beat 52", background=c1.get())


# Defining number type
b48_0var = IntVar()
b48_1var = IntVar()
b48_2var = IntVar()
b48_3var = IntVar()
b48_4var = IntVar()
b48_5var = IntVar()
b48_6var = IntVar()
b48_7var = IntVar()
b48_8var = IntVar()
b48_9var = IntVar()
b48_10var = IntVar()
b48_11var = IntVar()
b48_12var = IntVar()
b48_13var = IntVar()
b48_14var = IntVar()
b48_15var = IntVar()
b48_17var = IntVar()
trig_49var = IntVar()

b49_0var = IntVar()
b49_1var = IntVar()
b49_2var = IntVar()
b49_3var = IntVar()
b49_4var = IntVar()
b49_5var = IntVar()
b49_6var = IntVar()
b49_7var = IntVar()
b49_8var = IntVar()
b49_9var = IntVar()
b49_10var = IntVar()
b49_11var = IntVar()
b49_12var = IntVar()
b49_13var = IntVar()
b49_14var = IntVar()
b49_15var = IntVar()
b49_17var = IntVar()
trig_50var = IntVar()

b50_0var = IntVar()
b50_1var = IntVar()
b50_2var = IntVar()
b50_3var = IntVar()
b50_4var = IntVar()
b50_5var = IntVar()
b50_6var = IntVar()
b50_7var = IntVar()
b50_8var = IntVar()
b50_9var = IntVar()
b50_10var = IntVar()
b50_11var = IntVar()
b50_12var = IntVar()
b50_13var = IntVar()
b50_14var = IntVar()
b50_15var = IntVar()
b50_17var = IntVar()
trig_51var = IntVar()

b51_0var = IntVar()
b51_1var = IntVar()
b51_2var = IntVar()
b51_3var = IntVar()
b51_4var = IntVar()
b51_5var = IntVar()
b51_6var = IntVar()
b51_7var = IntVar()
b51_8var = IntVar()
b51_9var = IntVar()
b51_10var = IntVar()
b51_11var = IntVar()
b51_12var = IntVar()
b51_13var = IntVar()
b51_14var = IntVar()
b51_15var = IntVar()
b51_17var = IntVar()
trig_52var = IntVar()

# Setting default button position
b48_0var.set(0)
b48_1var.set(0)
b48_2var.set(0)
b48_3var.set(0)
b48_4var.set(0)
b48_5var.set(0)
b48_6var.set(0)
b48_7var.set(0)
b48_8var.set(0)
b48_9var.set(0)
b48_10var.set(0)
b48_11var.set(0)
b48_12var.set(0)
b48_13var.set(0)
b48_14var.set(0)
b48_15var.set(0)
b48_17var.set(0)
trig_49var.set(0)

b49_0var.set(0)
b49_1var.set(0)
b49_2var.set(0)
b49_3var.set(0)
b49_4var.set(0)
b49_5var.set(0)
b49_6var.set(0)
b49_7var.set(0)
b49_8var.set(0)
b49_9var.set(0)
b49_10var.set(0)
b49_11var.set(0)
b49_12var.set(0)
b49_13var.set(0)
b49_14var.set(0)
b49_15var.set(0)
b49_17var.set(0)
trig_50var.set(0)

b50_0var.set(0)
b50_1var.set(0)
b50_2var.set(0)
b50_3var.set(0)
b50_4var.set(0)
b50_5var.set(0)
b50_6var.set(0)
b50_7var.set(0)
b50_8var.set(0)
b50_9var.set(0)
b50_10var.set(0)
b50_11var.set(0)
b50_12var.set(0)
b50_13var.set(0)
b50_14var.set(0)
b50_15var.set(0)
b50_17var.set(0)
trig_51var.set(0)

b51_0var.set(0)
b51_1var.set(0)
b51_2var.set(0)
b51_3var.set(0)
b51_4var.set(0)
b51_5var.set(0)
b51_6var.set(0)
b51_7var.set(0)
b51_8var.set(0)
b51_9var.set(0)
b51_10var.set(0)
b51_11var.set(0)
b51_12var.set(0)
b51_13var.set(0)
b51_14var.set(0)
b51_15var.set(0)
b51_17var.set(0)
trig_52var.set(0)

# Defining button
b48_0 = ttk.Checkbutton(content, variable=b48_0var, onvalue=1, offvalue=0)
b48_1 = ttk.Checkbutton(content, variable=b48_1var, onvalue=1, offvalue=0)
b48_2 = ttk.Checkbutton(content, variable=b48_2var, onvalue=1, offvalue=0)
b48_3 = ttk.Checkbutton(content, variable=b48_3var, onvalue=1, offvalue=0)
b48_4 = ttk.Checkbutton(content, variable=b48_4var, onvalue=1, offvalue=0)
b48_5 = ttk.Checkbutton(content, variable=b48_5var, onvalue=1, offvalue=0)
b48_6 = ttk.Checkbutton(content, variable=b48_6var, onvalue=1, offvalue=0)
b48_7 = ttk.Checkbutton(content, variable=b48_7var, onvalue=1, offvalue=0)
b48_8 = ttk.Checkbutton(content, variable=b48_8var, onvalue=1, offvalue=0)
b48_9 = ttk.Checkbutton(content, variable=b48_9var, onvalue=1, offvalue=0)
b48_10 = ttk.Checkbutton(content, variable=b48_10var, onvalue=1, offvalue=0)
b48_11 = ttk.Checkbutton(content, variable=b48_11var, onvalue=1, offvalue=0)
b48_12 = ttk.Checkbutton(content, variable=b48_12var, onvalue=1, offvalue=0)
b48_13 = ttk.Checkbutton(content, variable=b48_13var, onvalue=1, offvalue=0)
b48_14 = ttk.Checkbutton(content, variable=b48_14var, onvalue=1, offvalue=0)
b48_15 = ttk.Checkbutton(content, variable=b48_15var, onvalue=1, offvalue=0)
b48_17 = ttk.Checkbutton(content, text="HALT", variable=b48_17var, onvalue=1, offvalue=0)
trig_49 = ttk.Checkbutton(content, variable=trig_49var, onvalue=1, offvalue=0)

b49_0 = ttk.Checkbutton(content, variable=b49_0var, onvalue=1, offvalue=0)
b49_1 = ttk.Checkbutton(content, variable=b49_1var, onvalue=1, offvalue=0)
b49_2 = ttk.Checkbutton(content, variable=b49_2var, onvalue=1, offvalue=0)
b49_3 = ttk.Checkbutton(content, variable=b49_3var, onvalue=1, offvalue=0)
b49_4 = ttk.Checkbutton(content, variable=b49_4var, onvalue=1, offvalue=0)
b49_5 = ttk.Checkbutton(content, variable=b49_5var, onvalue=1, offvalue=0)
b49_6 = ttk.Checkbutton(content, variable=b49_6var, onvalue=1, offvalue=0)
b49_7 = ttk.Checkbutton(content, variable=b49_7var, onvalue=1, offvalue=0)
b49_8 = ttk.Checkbutton(content, variable=b49_8var, onvalue=1, offvalue=0)
b49_9 = ttk.Checkbutton(content, variable=b49_9var, onvalue=1, offvalue=0)
b49_10 = ttk.Checkbutton(content, variable=b49_10var, onvalue=1, offvalue=0)
b49_11 = ttk.Checkbutton(content, variable=b49_11var, onvalue=1, offvalue=0)
b49_12 = ttk.Checkbutton(content, variable=b49_12var, onvalue=1, offvalue=0)
b49_13 = ttk.Checkbutton(content, variable=b49_13var, onvalue=1, offvalue=0)
b49_14 = ttk.Checkbutton(content, variable=b49_14var, onvalue=1, offvalue=0)
b49_15 = ttk.Checkbutton(content, variable=b49_15var, onvalue=1, offvalue=0)
b49_17 = ttk.Checkbutton(content, text="HALT", variable=b49_17var, onvalue=1, offvalue=0)
trig_50 = ttk.Checkbutton(content, variable=trig_50var, onvalue=1, offvalue=0)

b50_0 = ttk.Checkbutton(content, variable=b50_0var, onvalue=1, offvalue=0)
b50_1 = ttk.Checkbutton(content, variable=b50_1var, onvalue=1, offvalue=0)
b50_2 = ttk.Checkbutton(content, variable=b50_2var, onvalue=1, offvalue=0)
b50_3 = ttk.Checkbutton(content, variable=b50_3var, onvalue=1, offvalue=0)
b50_4 = ttk.Checkbutton(content, variable=b50_4var, onvalue=1, offvalue=0)
b50_5 = ttk.Checkbutton(content, variable=b50_5var, onvalue=1, offvalue=0)
b50_6 = ttk.Checkbutton(content, variable=b50_6var, onvalue=1, offvalue=0)
b50_7 = ttk.Checkbutton(content, variable=b50_7var, onvalue=1, offvalue=0)
b50_8 = ttk.Checkbutton(content, variable=b50_8var, onvalue=1, offvalue=0)
b50_9 = ttk.Checkbutton(content, variable=b50_9var, onvalue=1, offvalue=0)
b50_10 = ttk.Checkbutton(content, variable=b50_10var, onvalue=1, offvalue=0)
b50_11 = ttk.Checkbutton(content, variable=b50_11var, onvalue=1, offvalue=0)
b50_12 = ttk.Checkbutton(content, variable=b50_12var, onvalue=1, offvalue=0)
b50_13 = ttk.Checkbutton(content, variable=b50_13var, onvalue=1, offvalue=0)
b50_14 = ttk.Checkbutton(content, variable=b50_14var, onvalue=1, offvalue=0)
b50_15 = ttk.Checkbutton(content, variable=b50_15var, onvalue=1, offvalue=0)
b50_17 = ttk.Checkbutton(content, text="HALT", variable=b50_17var, onvalue=1, offvalue=0)
trig_51 = ttk.Checkbutton(content, variable=trig_51var, onvalue=1, offvalue=0)

b51_0 = ttk.Checkbutton(content, variable=b51_0var, onvalue=1, offvalue=0)
b51_1 = ttk.Checkbutton(content, variable=b51_1var, onvalue=1, offvalue=0)
b51_2 = ttk.Checkbutton(content, variable=b51_2var, onvalue=1, offvalue=0)
b51_3 = ttk.Checkbutton(content, variable=b51_3var, onvalue=1, offvalue=0)
b51_4 = ttk.Checkbutton(content, variable=b51_4var, onvalue=1, offvalue=0)
b51_5 = ttk.Checkbutton(content, variable=b51_5var, onvalue=1, offvalue=0)
b51_6 = ttk.Checkbutton(content, variable=b51_6var, onvalue=1, offvalue=0)
b51_7 = ttk.Checkbutton(content, variable=b51_7var, onvalue=1, offvalue=0)
b51_8 = ttk.Checkbutton(content, variable=b51_8var, onvalue=1, offvalue=0)
b51_9 = ttk.Checkbutton(content, variable=b51_9var, onvalue=1, offvalue=0)
b51_10 = ttk.Checkbutton(content, variable=b51_10var, onvalue=1, offvalue=0)
b51_11 = ttk.Checkbutton(content, variable=b51_11var, onvalue=1, offvalue=0)
b51_12 = ttk.Checkbutton(content, variable=b51_12var, onvalue=1, offvalue=0)
b51_13 = ttk.Checkbutton(content, variable=b51_13var, onvalue=1, offvalue=0)
b51_14 = ttk.Checkbutton(content, variable=b51_14var, onvalue=1, offvalue=0)
b51_15 = ttk.Checkbutton(content, variable=b51_15var, onvalue=1, offvalue=0)
b51_17 = ttk.Checkbutton(content, text="HALT", variable=b51_17var, onvalue=1, offvalue=0)
trig_52 = ttk.Checkbutton(content, variable=trig_52var, onvalue=1, offvalue=0)

# Placing text beside each beat
nameb48_0.grid(column=1, row=50)
nameb49_0.grid(column=1, row=51)
nameb50_0.grid(column=1, row=52)
nameb51_0.grid(column=1, row=53)

# Placing buttons on grid
b48_0.grid(column=2,row=50)
b48_1.grid(column=3,row=50)
b48_2.grid(column=4,row=50)
b48_3.grid(column=5,row=50)
b48_4.grid(column=6,row=50)
b48_5.grid(column=7,row=50)
b48_6.grid(column=8,row=50)
b48_7.grid(column=9,row=50)
b48_8.grid(column=10,row=50)
b48_9.grid(column=11,row=50)
b48_10.grid(column=12,row=50)
b48_11.grid(column=13,row=50)
b48_12.grid(column=14,row=50)
b48_13.grid(column=15,row=50)
b48_14.grid(column=16,row=50)
b48_15.grid(column=17,row=50)
b48_17.grid(column=19,row=50)
trig_49.grid(column=25,row=50)

b49_0.grid(column=2,row=51)
b49_1.grid(column=3,row=51)
b49_2.grid(column=4,row=51)
b49_3.grid(column=5,row=51)
b49_4.grid(column=6,row=51)
b49_5.grid(column=7,row=51)
b49_6.grid(column=8,row=51)
b49_7.grid(column=9,row=51)
b49_8.grid(column=10,row=51)
b49_9.grid(column=11,row=51)
b49_10.grid(column=12,row=51)
b49_11.grid(column=13,row=51)
b49_12.grid(column=14,row=51)
b49_13.grid(column=15,row=51)
b49_14.grid(column=16,row=51)
b49_15.grid(column=17,row=51)
b49_17.grid(column=19,row=51)
trig_50.grid(column=25,row=51)

b50_0.grid(column=2,row=52)
b50_1.grid(column=3,row=52)
b50_2.grid(column=4,row=52)
b50_3.grid(column=5,row=52)
b50_4.grid(column=6,row=52)
b50_5.grid(column=7,row=52)
b50_6.grid(column=8,row=52)
b50_7.grid(column=9,row=52)
b50_8.grid(column=10,row=52)
b50_9.grid(column=11,row=52)
b50_10.grid(column=12,row=52)
b50_11.grid(column=13,row=52)
b50_12.grid(column=14,row=52)
b50_13.grid(column=15,row=52)
b50_14.grid(column=16,row=52)
b50_15.grid(column=17,row=52)
b50_17.grid(column=19,row=52)
trig_51.grid(column=25,row=52)

b51_0.grid(column=2,row=53)
b51_1.grid(column=3,row=53)
b51_2.grid(column=4,row=53)
b51_3.grid(column=5,row=53)
b51_4.grid(column=6,row=53)
b51_5.grid(column=7,row=53)
b51_6.grid(column=8,row=53)
b51_7.grid(column=9,row=53)
b51_8.grid(column=10,row=53)
b51_9.grid(column=11,row=53)
b51_10.grid(column=12,row=53)
b51_11.grid(column=13,row=53)
b51_12.grid(column=14,row=53)
b51_13.grid(column=15,row=53)
b51_14.grid(column=16,row=53)
b51_15.grid(column=17,row=53)
b51_17.grid(column=19,row=53)
trig_52.grid(column=25,row=53)

# Group 14

# defining labels
nameb52_0 = ttk.Label(content, text="Beat 53", background=c1.get())
nameb53_0 = ttk.Label(content, text="Beat 54", background=c1.get())
nameb54_0 = ttk.Label(content, text="Beat 55", background=c1.get())
nameb55_0 = ttk.Label(content, text="Beat 56", background=c1.get())


# Defining number type
b52_0var = IntVar()
b52_1var = IntVar()
b52_2var = IntVar()
b52_3var = IntVar()
b52_4var = IntVar()
b52_5var = IntVar()
b52_6var = IntVar()
b52_7var = IntVar()
b52_8var = IntVar()
b52_9var = IntVar()
b52_10var = IntVar()
b52_11var = IntVar()
b52_12var = IntVar()
b52_13var = IntVar()
b52_14var = IntVar()
b52_15var = IntVar()
b52_17var = IntVar()
trig_53var = IntVar()

b53_0var = IntVar()
b53_1var = IntVar()
b53_2var = IntVar()
b53_3var = IntVar()
b53_4var = IntVar()
b53_5var = IntVar()
b53_6var = IntVar()
b53_7var = IntVar()
b53_8var = IntVar()
b53_9var = IntVar()
b53_10var = IntVar()
b53_11var = IntVar()
b53_12var = IntVar()
b53_13var = IntVar()
b53_14var = IntVar()
b53_15var = IntVar()
b53_17var = IntVar()
trig_54var = IntVar()

b54_0var = IntVar()
b54_1var = IntVar()
b54_2var = IntVar()
b54_3var = IntVar()
b54_4var = IntVar()
b54_5var = IntVar()
b54_6var = IntVar()
b54_7var = IntVar()
b54_8var = IntVar()
b54_9var = IntVar()
b54_10var = IntVar()
b54_11var = IntVar()
b54_12var = IntVar()
b54_13var = IntVar()
b54_14var = IntVar()
b54_15var = IntVar()
b54_17var = IntVar()
trig_55var = IntVar()

b55_0var = IntVar()
b55_1var = IntVar()
b55_2var = IntVar()
b55_3var = IntVar()
b55_4var = IntVar()
b55_5var = IntVar()
b55_6var = IntVar()
b55_7var = IntVar()
b55_8var = IntVar()
b55_9var = IntVar()
b55_10var = IntVar()
b55_11var = IntVar()
b55_12var = IntVar()
b55_13var = IntVar()
b55_14var = IntVar()
b55_15var = IntVar()
b55_17var = IntVar()
trig_56var = IntVar()

# Setting default button position
b52_0var.set(0)
b52_1var.set(0)
b52_2var.set(0)
b52_3var.set(0)
b52_4var.set(0)
b52_5var.set(0)
b52_6var.set(0)
b52_7var.set(0)
b52_8var.set(0)
b52_9var.set(0)
b52_10var.set(0)
b52_11var.set(0)
b52_12var.set(0)
b52_13var.set(0)
b52_14var.set(0)
b52_15var.set(0)
b52_17var.set(0)
trig_53var.set(0)

b53_0var.set(0)
b53_1var.set(0)
b53_2var.set(0)
b53_3var.set(0)
b53_4var.set(0)
b53_5var.set(0)
b53_6var.set(0)
b53_7var.set(0)
b53_8var.set(0)
b53_9var.set(0)
b53_10var.set(0)
b53_11var.set(0)
b53_12var.set(0)
b53_13var.set(0)
b53_14var.set(0)
b53_15var.set(0)
b53_17var.set(0)
trig_54var.set(0)

b54_0var.set(0)
b54_1var.set(0)
b54_2var.set(0)
b54_3var.set(0)
b54_4var.set(0)
b54_5var.set(0)
b54_6var.set(0)
b54_7var.set(0)
b54_8var.set(0)
b54_9var.set(0)
b54_10var.set(0)
b54_11var.set(0)
b54_12var.set(0)
b54_13var.set(0)
b54_14var.set(0)
b54_15var.set(0)
b54_17var.set(0)
trig_55var.set(0)

b55_0var.set(0)
b55_1var.set(0)
b55_2var.set(0)
b55_3var.set(0)
b55_4var.set(0)
b55_5var.set(0)
b55_6var.set(0)
b55_7var.set(0)
b55_8var.set(0)
b55_9var.set(0)
b55_10var.set(0)
b55_11var.set(0)
b55_12var.set(0)
b55_13var.set(0)
b55_14var.set(0)
b55_15var.set(0)
b55_17var.set(0)
trig_56var.set(0)

# Defining button
b52_0 = ttk.Checkbutton(content, variable=b52_0var, onvalue=1, offvalue=0)
b52_1 = ttk.Checkbutton(content, variable=b52_1var, onvalue=1, offvalue=0)
b52_2 = ttk.Checkbutton(content, variable=b52_2var, onvalue=1, offvalue=0)
b52_3 = ttk.Checkbutton(content, variable=b52_3var, onvalue=1, offvalue=0)
b52_4 = ttk.Checkbutton(content, variable=b52_4var, onvalue=1, offvalue=0)
b52_5 = ttk.Checkbutton(content, variable=b52_5var, onvalue=1, offvalue=0)
b52_6 = ttk.Checkbutton(content, variable=b52_6var, onvalue=1, offvalue=0)
b52_7 = ttk.Checkbutton(content, variable=b52_7var, onvalue=1, offvalue=0)
b52_8 = ttk.Checkbutton(content, variable=b52_8var, onvalue=1, offvalue=0)
b52_9 = ttk.Checkbutton(content, variable=b52_9var, onvalue=1, offvalue=0)
b52_10 = ttk.Checkbutton(content, variable=b52_10var, onvalue=1, offvalue=0)
b52_11 = ttk.Checkbutton(content, variable=b52_11var, onvalue=1, offvalue=0)
b52_12 = ttk.Checkbutton(content, variable=b52_12var, onvalue=1, offvalue=0)
b52_13 = ttk.Checkbutton(content, variable=b52_13var, onvalue=1, offvalue=0)
b52_14 = ttk.Checkbutton(content, variable=b52_14var, onvalue=1, offvalue=0)
b52_15 = ttk.Checkbutton(content, variable=b52_15var, onvalue=1, offvalue=0)
b52_17 = ttk.Checkbutton(content, text="HALT", variable=b52_17var, onvalue=1, offvalue=0)
trig_53 = ttk.Checkbutton(content, variable=trig_53var, onvalue=1, offvalue=0)

b53_0 = ttk.Checkbutton(content, variable=b53_0var, onvalue=1, offvalue=0)
b53_1 = ttk.Checkbutton(content, variable=b53_1var, onvalue=1, offvalue=0)
b53_2 = ttk.Checkbutton(content, variable=b53_2var, onvalue=1, offvalue=0)
b53_3 = ttk.Checkbutton(content, variable=b53_3var, onvalue=1, offvalue=0)
b53_4 = ttk.Checkbutton(content, variable=b53_4var, onvalue=1, offvalue=0)
b53_5 = ttk.Checkbutton(content, variable=b53_5var, onvalue=1, offvalue=0)
b53_6 = ttk.Checkbutton(content, variable=b53_6var, onvalue=1, offvalue=0)
b53_7 = ttk.Checkbutton(content, variable=b53_7var, onvalue=1, offvalue=0)
b53_8 = ttk.Checkbutton(content, variable=b53_8var, onvalue=1, offvalue=0)
b53_9 = ttk.Checkbutton(content, variable=b53_9var, onvalue=1, offvalue=0)
b53_10 = ttk.Checkbutton(content, variable=b53_10var, onvalue=1, offvalue=0)
b53_11 = ttk.Checkbutton(content, variable=b53_11var, onvalue=1, offvalue=0)
b53_12 = ttk.Checkbutton(content, variable=b53_12var, onvalue=1, offvalue=0)
b53_13 = ttk.Checkbutton(content, variable=b53_13var, onvalue=1, offvalue=0)
b53_14 = ttk.Checkbutton(content, variable=b53_14var, onvalue=1, offvalue=0)
b53_15 = ttk.Checkbutton(content, variable=b53_15var, onvalue=1, offvalue=0)
b53_17 = ttk.Checkbutton(content, text="HALT", variable=b53_17var, onvalue=1, offvalue=0)
trig_54 = ttk.Checkbutton(content, variable=trig_54var, onvalue=1, offvalue=0)

b54_0 = ttk.Checkbutton(content, variable=b54_0var, onvalue=1, offvalue=0)
b54_1 = ttk.Checkbutton(content, variable=b54_1var, onvalue=1, offvalue=0)
b54_2 = ttk.Checkbutton(content, variable=b54_2var, onvalue=1, offvalue=0)
b54_3 = ttk.Checkbutton(content, variable=b54_3var, onvalue=1, offvalue=0)
b54_4 = ttk.Checkbutton(content, variable=b54_4var, onvalue=1, offvalue=0)
b54_5 = ttk.Checkbutton(content, variable=b54_5var, onvalue=1, offvalue=0)
b54_6 = ttk.Checkbutton(content, variable=b54_6var, onvalue=1, offvalue=0)
b54_7 = ttk.Checkbutton(content, variable=b54_7var, onvalue=1, offvalue=0)
b54_8 = ttk.Checkbutton(content, variable=b54_8var, onvalue=1, offvalue=0)
b54_9 = ttk.Checkbutton(content, variable=b54_9var, onvalue=1, offvalue=0)
b54_10 = ttk.Checkbutton(content, variable=b54_10var, onvalue=1, offvalue=0)
b54_11 = ttk.Checkbutton(content, variable=b54_11var, onvalue=1, offvalue=0)
b54_12 = ttk.Checkbutton(content, variable=b54_12var, onvalue=1, offvalue=0)
b54_13 = ttk.Checkbutton(content, variable=b54_13var, onvalue=1, offvalue=0)
b54_14 = ttk.Checkbutton(content, variable=b54_14var, onvalue=1, offvalue=0)
b54_15 = ttk.Checkbutton(content, variable=b54_15var, onvalue=1, offvalue=0)
b54_17 = ttk.Checkbutton(content, text="HALT", variable=b54_17var, onvalue=1, offvalue=0)
trig_55 = ttk.Checkbutton(content, variable=trig_55var, onvalue=1, offvalue=0)

b55_0 = ttk.Checkbutton(content, variable=b55_0var, onvalue=1, offvalue=0)
b55_1 = ttk.Checkbutton(content, variable=b55_1var, onvalue=1, offvalue=0)
b55_2 = ttk.Checkbutton(content, variable=b55_2var, onvalue=1, offvalue=0)
b55_3 = ttk.Checkbutton(content, variable=b55_3var, onvalue=1, offvalue=0)
b55_4 = ttk.Checkbutton(content, variable=b55_4var, onvalue=1, offvalue=0)
b55_5 = ttk.Checkbutton(content, variable=b55_5var, onvalue=1, offvalue=0)
b55_6 = ttk.Checkbutton(content, variable=b55_6var, onvalue=1, offvalue=0)
b55_7 = ttk.Checkbutton(content, variable=b55_7var, onvalue=1, offvalue=0)
b55_8 = ttk.Checkbutton(content, variable=b55_8var, onvalue=1, offvalue=0)
b55_9 = ttk.Checkbutton(content, variable=b55_9var, onvalue=1, offvalue=0)
b55_10 = ttk.Checkbutton(content, variable=b55_10var, onvalue=1, offvalue=0)
b55_11 = ttk.Checkbutton(content, variable=b55_11var, onvalue=1, offvalue=0)
b55_12 = ttk.Checkbutton(content, variable=b55_12var, onvalue=1, offvalue=0)
b55_13 = ttk.Checkbutton(content, variable=b55_13var, onvalue=1, offvalue=0)
b55_14 = ttk.Checkbutton(content, variable=b55_14var, onvalue=1, offvalue=0)
b55_15 = ttk.Checkbutton(content, variable=b55_15var, onvalue=1, offvalue=0)
b55_17 = ttk.Checkbutton(content, text="HALT", variable=b55_17var, onvalue=1, offvalue=0)
trig_56 = ttk.Checkbutton(content, variable=trig_56var, onvalue=1, offvalue=0)

# Placing text beside each beat
nameb52_0.grid(column=1, row=54)
nameb53_0.grid(column=1, row=55)
nameb54_0.grid(column=1, row=56)
nameb55_0.grid(column=1, row=57)

# Placing buttons on grid
b52_0.grid(column=2,row=54)
b52_1.grid(column=3,row=54)
b52_2.grid(column=4,row=54)
b52_3.grid(column=5,row=54)
b52_4.grid(column=6,row=54)
b52_5.grid(column=7,row=54)
b52_6.grid(column=8,row=54)
b52_7.grid(column=9,row=54)
b52_8.grid(column=10,row=54)
b52_9.grid(column=11,row=54)
b52_10.grid(column=12,row=54)
b52_11.grid(column=13,row=54)
b52_12.grid(column=14,row=54)
b52_13.grid(column=15,row=54)
b52_14.grid(column=16,row=54)
b52_15.grid(column=17,row=54)
b52_17.grid(column=19,row=54)
trig_53.grid(column=25,row=54)

b53_0.grid(column=2,row=55)
b53_1.grid(column=3,row=55)
b53_2.grid(column=4,row=55)
b53_3.grid(column=5,row=55)
b53_4.grid(column=6,row=55)
b53_5.grid(column=7,row=55)
b53_6.grid(column=8,row=55)
b53_7.grid(column=9,row=55)
b53_8.grid(column=10,row=55)
b53_9.grid(column=11,row=55)
b53_10.grid(column=12,row=55)
b53_11.grid(column=13,row=55)
b53_12.grid(column=14,row=55)
b53_13.grid(column=15,row=55)
b53_14.grid(column=16,row=55)
b53_15.grid(column=17,row=55)
b53_17.grid(column=19,row=55)
trig_54.grid(column=25,row=55)

b54_0.grid(column=2,row=56)
b54_1.grid(column=3,row=56)
b54_2.grid(column=4,row=56)
b54_3.grid(column=5,row=56)
b54_4.grid(column=6,row=56)
b54_5.grid(column=7,row=56)
b54_6.grid(column=8,row=56)
b54_7.grid(column=9,row=56)
b54_8.grid(column=10,row=56)
b54_9.grid(column=11,row=56)
b54_10.grid(column=12,row=56)
b54_11.grid(column=13,row=56)
b54_12.grid(column=14,row=56)
b54_13.grid(column=15,row=56)
b54_14.grid(column=16,row=56)
b54_15.grid(column=17,row=56)
b54_17.grid(column=19,row=56)
trig_55.grid(column=25,row=56)

b55_0.grid(column=2,row=57)
b55_1.grid(column=3,row=57)
b55_2.grid(column=4,row=57)
b55_3.grid(column=5,row=57)
b55_4.grid(column=6,row=57)
b55_5.grid(column=7,row=57)
b55_6.grid(column=8,row=57)
b55_7.grid(column=9,row=57)
b55_8.grid(column=10,row=57)
b55_9.grid(column=11,row=57)
b55_10.grid(column=12,row=57)
b55_11.grid(column=13,row=57)
b55_12.grid(column=14,row=57)
b55_13.grid(column=15,row=57)
b55_14.grid(column=16,row=57)
b55_15.grid(column=17,row=57)
b55_17.grid(column=19,row=57)
trig_56.grid(column=25,row=57)

# Group 15

# defining labels
nameb56_0 = ttk.Label(content, text="Beat 57", background=c1.get())
nameb57_0 = ttk.Label(content, text="Beat 58", background=c1.get())
nameb58_0 = ttk.Label(content, text="Beat 59", background=c1.get())
nameb59_0 = ttk.Label(content, text="Beat 60", background=c1.get())


# Defining number type
b56_0var = IntVar()
b56_1var = IntVar()
b56_2var = IntVar()
b56_3var = IntVar()
b56_4var = IntVar()
b56_5var = IntVar()
b56_6var = IntVar()
b56_7var = IntVar()
b56_8var = IntVar()
b56_9var = IntVar()
b56_10var = IntVar()
b56_11var = IntVar()
b56_12var = IntVar()
b56_13var = IntVar()
b56_14var = IntVar()
b56_15var = IntVar()
b56_17var = IntVar()
trig_57var = IntVar()

b57_0var = IntVar()
b57_1var = IntVar()
b57_2var = IntVar()
b57_3var = IntVar()
b57_4var = IntVar()
b57_5var = IntVar()
b57_6var = IntVar()
b57_7var = IntVar()
b57_8var = IntVar()
b57_9var = IntVar()
b57_10var = IntVar()
b57_11var = IntVar()
b57_12var = IntVar()
b57_13var = IntVar()
b57_14var = IntVar()
b57_15var = IntVar()
b57_17var = IntVar()
trig_58var = IntVar()

b58_0var = IntVar()
b58_1var = IntVar()
b58_2var = IntVar()
b58_3var = IntVar()
b58_4var = IntVar()
b58_5var = IntVar()
b58_6var = IntVar()
b58_7var = IntVar()
b58_8var = IntVar()
b58_9var = IntVar()
b58_10var = IntVar()
b58_11var = IntVar()
b58_12var = IntVar()
b58_13var = IntVar()
b58_14var = IntVar()
b58_15var = IntVar()
b58_17var = IntVar()
trig_59var = IntVar()

b59_0var = IntVar()
b59_1var = IntVar()
b59_2var = IntVar()
b59_3var = IntVar()
b59_4var = IntVar()
b59_5var = IntVar()
b59_6var = IntVar()
b59_7var = IntVar()
b59_8var = IntVar()
b59_9var = IntVar()
b59_10var = IntVar()
b59_11var = IntVar()
b59_12var = IntVar()
b59_13var = IntVar()
b59_14var = IntVar()
b59_15var = IntVar()
b59_17var = IntVar()
trig_60var = IntVar()

# Setting default button position
b56_0var.set(0)
b56_1var.set(0)
b56_2var.set(0)
b56_3var.set(0)
b56_4var.set(0)
b56_5var.set(0)
b56_6var.set(0)
b56_7var.set(0)
b56_8var.set(0)
b56_9var.set(0)
b56_10var.set(0)
b56_11var.set(0)
b56_12var.set(0)
b56_13var.set(0)
b56_14var.set(0)
b56_15var.set(0)
b56_17var.set(0)
trig_57var.set(0)

b57_0var.set(0)
b57_1var.set(0)
b57_2var.set(0)
b57_3var.set(0)
b57_4var.set(0)
b57_5var.set(0)
b57_6var.set(0)
b57_7var.set(0)
b57_8var.set(0)
b57_9var.set(0)
b57_10var.set(0)
b57_11var.set(0)
b57_12var.set(0)
b57_13var.set(0)
b57_14var.set(0)
b57_15var.set(0)
b57_17var.set(0)
trig_58var.set(0)

b58_0var.set(0)
b58_1var.set(0)
b58_2var.set(0)
b58_3var.set(0)
b58_4var.set(0)
b58_5var.set(0)
b58_6var.set(0)
b58_7var.set(0)
b58_8var.set(0)
b58_9var.set(0)
b58_10var.set(0)
b58_11var.set(0)
b58_12var.set(0)
b58_13var.set(0)
b58_14var.set(0)
b58_15var.set(0)
b58_17var.set(0)
trig_59var.set(0)

b59_0var.set(0)
b59_1var.set(0)
b59_2var.set(0)
b59_3var.set(0)
b59_4var.set(0)
b59_5var.set(0)
b59_6var.set(0)
b59_7var.set(0)
b59_8var.set(0)
b59_9var.set(0)
b59_10var.set(0)
b59_11var.set(0)
b59_12var.set(0)
b59_13var.set(0)
b59_14var.set(0)
b59_15var.set(0)
b59_17var.set(0)
trig_60var.set(0)

# Defining button
b56_0 = ttk.Checkbutton(content, variable=b56_0var, onvalue=1, offvalue=0)
b56_1 = ttk.Checkbutton(content, variable=b56_1var, onvalue=1, offvalue=0)
b56_2 = ttk.Checkbutton(content, variable=b56_2var, onvalue=1, offvalue=0)
b56_3 = ttk.Checkbutton(content, variable=b56_3var, onvalue=1, offvalue=0)
b56_4 = ttk.Checkbutton(content, variable=b56_4var, onvalue=1, offvalue=0)
b56_5 = ttk.Checkbutton(content, variable=b56_5var, onvalue=1, offvalue=0)
b56_6 = ttk.Checkbutton(content, variable=b56_6var, onvalue=1, offvalue=0)
b56_7 = ttk.Checkbutton(content, variable=b56_7var, onvalue=1, offvalue=0)
b56_8 = ttk.Checkbutton(content, variable=b56_8var, onvalue=1, offvalue=0)
b56_9 = ttk.Checkbutton(content, variable=b56_9var, onvalue=1, offvalue=0)
b56_10 = ttk.Checkbutton(content, variable=b56_10var, onvalue=1, offvalue=0)
b56_11 = ttk.Checkbutton(content, variable=b56_11var, onvalue=1, offvalue=0)
b56_12 = ttk.Checkbutton(content, variable=b56_12var, onvalue=1, offvalue=0)
b56_13 = ttk.Checkbutton(content, variable=b56_13var, onvalue=1, offvalue=0)
b56_14 = ttk.Checkbutton(content, variable=b56_14var, onvalue=1, offvalue=0)
b56_15 = ttk.Checkbutton(content, variable=b56_15var, onvalue=1, offvalue=0)
b56_17 = ttk.Checkbutton(content, text="HALT", variable=b56_17var, onvalue=1, offvalue=0)
trig_57 = ttk.Checkbutton(content, variable=trig_57var, onvalue=1, offvalue=0)

b57_0 = ttk.Checkbutton(content, variable=b57_0var, onvalue=1, offvalue=0)
b57_1 = ttk.Checkbutton(content, variable=b57_1var, onvalue=1, offvalue=0)
b57_2 = ttk.Checkbutton(content, variable=b57_2var, onvalue=1, offvalue=0)
b57_3 = ttk.Checkbutton(content, variable=b57_3var, onvalue=1, offvalue=0)
b57_4 = ttk.Checkbutton(content, variable=b57_4var, onvalue=1, offvalue=0)
b57_5 = ttk.Checkbutton(content, variable=b57_5var, onvalue=1, offvalue=0)
b57_6 = ttk.Checkbutton(content, variable=b57_6var, onvalue=1, offvalue=0)
b57_7 = ttk.Checkbutton(content, variable=b57_7var, onvalue=1, offvalue=0)
b57_8 = ttk.Checkbutton(content, variable=b57_8var, onvalue=1, offvalue=0)
b57_9 = ttk.Checkbutton(content, variable=b57_9var, onvalue=1, offvalue=0)
b57_10 = ttk.Checkbutton(content, variable=b57_10var, onvalue=1, offvalue=0)
b57_11 = ttk.Checkbutton(content, variable=b57_11var, onvalue=1, offvalue=0)
b57_12 = ttk.Checkbutton(content, variable=b57_12var, onvalue=1, offvalue=0)
b57_13 = ttk.Checkbutton(content, variable=b57_13var, onvalue=1, offvalue=0)
b57_14 = ttk.Checkbutton(content, variable=b57_14var, onvalue=1, offvalue=0)
b57_15 = ttk.Checkbutton(content, variable=b57_15var, onvalue=1, offvalue=0)
b57_17 = ttk.Checkbutton(content, text="HALT", variable=b57_17var, onvalue=1, offvalue=0)
trig_58 = ttk.Checkbutton(content, variable=trig_58var, onvalue=1, offvalue=0)

b58_0 = ttk.Checkbutton(content, variable=b58_0var, onvalue=1, offvalue=0)
b58_1 = ttk.Checkbutton(content, variable=b58_1var, onvalue=1, offvalue=0)
b58_2 = ttk.Checkbutton(content, variable=b58_2var, onvalue=1, offvalue=0)
b58_3 = ttk.Checkbutton(content, variable=b58_3var, onvalue=1, offvalue=0)
b58_4 = ttk.Checkbutton(content, variable=b58_4var, onvalue=1, offvalue=0)
b58_5 = ttk.Checkbutton(content, variable=b58_5var, onvalue=1, offvalue=0)
b58_6 = ttk.Checkbutton(content, variable=b58_6var, onvalue=1, offvalue=0)
b58_7 = ttk.Checkbutton(content, variable=b58_7var, onvalue=1, offvalue=0)
b58_8 = ttk.Checkbutton(content, variable=b58_8var, onvalue=1, offvalue=0)
b58_9 = ttk.Checkbutton(content, variable=b58_9var, onvalue=1, offvalue=0)
b58_10 = ttk.Checkbutton(content, variable=b58_10var, onvalue=1, offvalue=0)
b58_11 = ttk.Checkbutton(content, variable=b58_11var, onvalue=1, offvalue=0)
b58_12 = ttk.Checkbutton(content, variable=b58_12var, onvalue=1, offvalue=0)
b58_13 = ttk.Checkbutton(content, variable=b58_13var, onvalue=1, offvalue=0)
b58_14 = ttk.Checkbutton(content, variable=b58_14var, onvalue=1, offvalue=0)
b58_15 = ttk.Checkbutton(content, variable=b58_15var, onvalue=1, offvalue=0)
b58_17 = ttk.Checkbutton(content, text="HALT", variable=b58_17var, onvalue=1, offvalue=0)
trig_59 = ttk.Checkbutton(content, variable=trig_59var, onvalue=1, offvalue=0)

b59_0 = ttk.Checkbutton(content, variable=b59_0var, onvalue=1, offvalue=0)
b59_1 = ttk.Checkbutton(content, variable=b59_1var, onvalue=1, offvalue=0)
b59_2 = ttk.Checkbutton(content, variable=b59_2var, onvalue=1, offvalue=0)
b59_3 = ttk.Checkbutton(content, variable=b59_3var, onvalue=1, offvalue=0)
b59_4 = ttk.Checkbutton(content, variable=b59_4var, onvalue=1, offvalue=0)
b59_5 = ttk.Checkbutton(content, variable=b59_5var, onvalue=1, offvalue=0)
b59_6 = ttk.Checkbutton(content, variable=b59_6var, onvalue=1, offvalue=0)
b59_7 = ttk.Checkbutton(content, variable=b59_7var, onvalue=1, offvalue=0)
b59_8 = ttk.Checkbutton(content, variable=b59_8var, onvalue=1, offvalue=0)
b59_9 = ttk.Checkbutton(content, variable=b59_9var, onvalue=1, offvalue=0)
b59_10 = ttk.Checkbutton(content, variable=b59_10var, onvalue=1, offvalue=0)
b59_11 = ttk.Checkbutton(content, variable=b59_11var, onvalue=1, offvalue=0)
b59_12 = ttk.Checkbutton(content, variable=b59_12var, onvalue=1, offvalue=0)
b59_13 = ttk.Checkbutton(content, variable=b59_13var, onvalue=1, offvalue=0)
b59_14 = ttk.Checkbutton(content, variable=b59_14var, onvalue=1, offvalue=0)
b59_15 = ttk.Checkbutton(content, variable=b59_15var, onvalue=1, offvalue=0)
b59_17 = ttk.Checkbutton(content, text="HALT", variable=b59_17var, onvalue=1, offvalue=0)
trig_60 = ttk.Checkbutton(content, variable=trig_60var, onvalue=1, offvalue=0)

# Placing text beside each beat
nameb56_0.grid(column=1, row=58)
nameb57_0.grid(column=1, row=59)
nameb58_0.grid(column=1, row=60)
nameb59_0.grid(column=1, row=61)

# Placing buttons on grid
b56_0.grid(column=2,row=58)
b56_1.grid(column=3,row=58)
b56_2.grid(column=4,row=58)
b56_3.grid(column=5,row=58)
b56_4.grid(column=6,row=58)
b56_5.grid(column=7,row=58)
b56_6.grid(column=8,row=58)
b56_7.grid(column=9,row=58)
b56_8.grid(column=10,row=58)
b56_9.grid(column=11,row=58)
b56_10.grid(column=12,row=58)
b56_11.grid(column=13,row=58)
b56_12.grid(column=14,row=58)
b56_13.grid(column=15,row=58)
b56_14.grid(column=16,row=58)
b56_15.grid(column=17,row=58)
b56_17.grid(column=19,row=58)
trig_57.grid(column=25,row=58)

b57_0.grid(column=2,row=59)
b57_1.grid(column=3,row=59)
b57_2.grid(column=4,row=59)
b57_3.grid(column=5,row=59)
b57_4.grid(column=6,row=59)
b57_5.grid(column=7,row=59)
b57_6.grid(column=8,row=59)
b57_7.grid(column=9,row=59)
b57_8.grid(column=10,row=59)
b57_9.grid(column=11,row=59)
b57_10.grid(column=12,row=59)
b57_11.grid(column=13,row=59)
b57_12.grid(column=14,row=59)
b57_13.grid(column=15,row=59)
b57_14.grid(column=16,row=59)
b57_15.grid(column=17,row=59)
b57_17.grid(column=19,row=59)
trig_58.grid(column=25,row=59)

b58_0.grid(column=2,row=60)
b58_1.grid(column=3,row=60)
b58_2.grid(column=4,row=60)
b58_3.grid(column=5,row=60)
b58_4.grid(column=6,row=60)
b58_5.grid(column=7,row=60)
b58_6.grid(column=8,row=60)
b58_7.grid(column=9,row=60)
b58_8.grid(column=10,row=60)
b58_9.grid(column=11,row=60)
b58_10.grid(column=12,row=60)
b58_11.grid(column=13,row=60)
b58_12.grid(column=14,row=60)
b58_13.grid(column=15,row=60)
b58_14.grid(column=16,row=60)
b58_15.grid(column=17,row=60)
b58_17.grid(column=19,row=60)
trig_59.grid(column=25,row=60)

b59_0.grid(column=2,row=61)
b59_1.grid(column=3,row=61)
b59_2.grid(column=4,row=61)
b59_3.grid(column=5,row=61)
b59_4.grid(column=6,row=61)
b59_5.grid(column=7,row=61)
b59_6.grid(column=8,row=61)
b59_7.grid(column=9,row=61)
b59_8.grid(column=10,row=61)
b59_9.grid(column=11,row=61)
b59_10.grid(column=12,row=61)
b59_11.grid(column=13,row=61)
b59_12.grid(column=14,row=61)
b59_13.grid(column=15,row=61)
b59_14.grid(column=16,row=61)
b59_15.grid(column=17,row=61)
b59_17.grid(column=19,row=61)
trig_60.grid(column=25,row=61)

# Group 16

# defining labels
nameb60_0 = ttk.Label(content, text="Beat 61", background=c1.get())
nameb61_0 = ttk.Label(content, text="Beat 62", background=c1.get())
nameb62_0 = ttk.Label(content, text="Beat 63", background=c1.get())
nameb63_0 = ttk.Label(content, text="Beat 64", background=c1.get())


# Defining number type
b60_0var = IntVar()
b60_1var = IntVar()
b60_2var = IntVar()
b60_3var = IntVar()
b60_4var = IntVar()
b60_5var = IntVar()
b60_6var = IntVar()
b60_7var = IntVar()
b60_8var = IntVar()
b60_9var = IntVar()
b60_10var = IntVar()
b60_11var = IntVar()
b60_12var = IntVar()
b60_13var = IntVar()
b60_14var = IntVar()
b60_15var = IntVar()
b60_17var = IntVar()
trig_61var = IntVar()

b61_0var = IntVar()
b61_1var = IntVar()
b61_2var = IntVar()
b61_3var = IntVar()
b61_4var = IntVar()
b61_5var = IntVar()
b61_6var = IntVar()
b61_7var = IntVar()
b61_8var = IntVar()
b61_9var = IntVar()
b61_10var = IntVar()
b61_11var = IntVar()
b61_12var = IntVar()
b61_13var = IntVar()
b61_14var = IntVar()
b61_15var = IntVar()
b61_17var = IntVar()
trig_62var = IntVar()

b62_0var = IntVar()
b62_1var = IntVar()
b62_2var = IntVar()
b62_3var = IntVar()
b62_4var = IntVar()
b62_5var = IntVar()
b62_6var = IntVar()
b62_7var = IntVar()
b62_8var = IntVar()
b62_9var = IntVar()
b62_10var = IntVar()
b62_11var = IntVar()
b62_12var = IntVar()
b62_13var = IntVar()
b62_14var = IntVar()
b62_15var = IntVar()
b62_17var = IntVar()
trig_63var = IntVar()

b63_0var = IntVar()
b63_1var = IntVar()
b63_2var = IntVar()
b63_3var = IntVar()
b63_4var = IntVar()
b63_5var = IntVar()
b63_6var = IntVar()
b63_7var = IntVar()
b63_8var = IntVar()
b63_9var = IntVar()
b63_10var = IntVar()
b63_11var = IntVar()
b63_12var = IntVar()
b63_13var = IntVar()
b63_14var = IntVar()
b63_15var = IntVar()
b63_17var = IntVar()
trig_64var = IntVar()

# Setting default button position
b60_0var.set(0)
b60_1var.set(0)
b60_2var.set(0)
b60_3var.set(0)
b60_4var.set(0)
b60_5var.set(0)
b60_6var.set(0)
b60_7var.set(0)
b60_8var.set(0)
b60_9var.set(0)
b60_10var.set(0)
b60_11var.set(0)
b60_12var.set(0)
b60_13var.set(0)
b60_14var.set(0)
b60_15var.set(0)
b60_17var.set(0)
trig_61var.set(0)

b61_0var.set(0)
b61_1var.set(0)
b61_2var.set(0)
b61_3var.set(0)
b61_4var.set(0)
b61_5var.set(0)
b61_6var.set(0)
b61_7var.set(0)
b61_8var.set(0)
b61_9var.set(0)
b61_10var.set(0)
b61_11var.set(0)
b61_12var.set(0)
b61_13var.set(0)
b61_14var.set(0)
b61_15var.set(0)
b61_17var.set(0)
trig_62var.set(0)

b62_0var.set(0)
b62_1var.set(0)
b62_2var.set(0)
b62_3var.set(0)
b62_4var.set(0)
b62_5var.set(0)
b62_6var.set(0)
b62_7var.set(0)
b62_8var.set(0)
b62_9var.set(0)
b62_10var.set(0)
b62_11var.set(0)
b62_12var.set(0)
b62_13var.set(0)
b62_14var.set(0)
b62_15var.set(0)
b62_17var.set(0)
trig_63var.set(0)

b63_0var.set(0)
b63_1var.set(0)
b63_2var.set(0)
b63_3var.set(0)
b63_4var.set(0)
b63_5var.set(0)
b63_6var.set(0)
b63_7var.set(0)
b63_8var.set(0)
b63_9var.set(0)
b63_10var.set(0)
b63_11var.set(0)
b63_12var.set(0)
b63_13var.set(0)
b63_14var.set(0)
b63_15var.set(0)
b63_17var.set(0)
trig_64var.set(0)

# Defining button
b60_0 = ttk.Checkbutton(content, variable=b60_0var, onvalue=1, offvalue=0)
b60_1 = ttk.Checkbutton(content, variable=b60_1var, onvalue=1, offvalue=0)
b60_2 = ttk.Checkbutton(content, variable=b60_2var, onvalue=1, offvalue=0)
b60_3 = ttk.Checkbutton(content, variable=b60_3var, onvalue=1, offvalue=0)
b60_4 = ttk.Checkbutton(content, variable=b60_4var, onvalue=1, offvalue=0)
b60_5 = ttk.Checkbutton(content, variable=b60_5var, onvalue=1, offvalue=0)
b60_6 = ttk.Checkbutton(content, variable=b60_6var, onvalue=1, offvalue=0)
b60_7 = ttk.Checkbutton(content, variable=b60_7var, onvalue=1, offvalue=0)
b60_8 = ttk.Checkbutton(content, variable=b60_8var, onvalue=1, offvalue=0)
b60_9 = ttk.Checkbutton(content, variable=b60_9var, onvalue=1, offvalue=0)
b60_10 = ttk.Checkbutton(content, variable=b60_10var, onvalue=1, offvalue=0)
b60_11 = ttk.Checkbutton(content, variable=b60_11var, onvalue=1, offvalue=0)
b60_12 = ttk.Checkbutton(content, variable=b60_12var, onvalue=1, offvalue=0)
b60_13 = ttk.Checkbutton(content, variable=b60_13var, onvalue=1, offvalue=0)
b60_14 = ttk.Checkbutton(content, variable=b60_14var, onvalue=1, offvalue=0)
b60_15 = ttk.Checkbutton(content, variable=b60_15var, onvalue=1, offvalue=0)
b60_17 = ttk.Checkbutton(content, text="HALT", variable=b60_17var, onvalue=1, offvalue=0)
trig_61 = ttk.Checkbutton(content, variable=trig_61var, onvalue=1, offvalue=0)

b61_0 = ttk.Checkbutton(content, variable=b61_0var, onvalue=1, offvalue=0)
b61_1 = ttk.Checkbutton(content, variable=b61_1var, onvalue=1, offvalue=0)
b61_2 = ttk.Checkbutton(content, variable=b61_2var, onvalue=1, offvalue=0)
b61_3 = ttk.Checkbutton(content, variable=b61_3var, onvalue=1, offvalue=0)
b61_4 = ttk.Checkbutton(content, variable=b61_4var, onvalue=1, offvalue=0)
b61_5 = ttk.Checkbutton(content, variable=b61_5var, onvalue=1, offvalue=0)
b61_6 = ttk.Checkbutton(content, variable=b61_6var, onvalue=1, offvalue=0)
b61_7 = ttk.Checkbutton(content, variable=b61_7var, onvalue=1, offvalue=0)
b61_8 = ttk.Checkbutton(content, variable=b61_8var, onvalue=1, offvalue=0)
b61_9 = ttk.Checkbutton(content, variable=b61_9var, onvalue=1, offvalue=0)
b61_10 = ttk.Checkbutton(content, variable=b61_10var, onvalue=1, offvalue=0)
b61_11 = ttk.Checkbutton(content, variable=b61_11var, onvalue=1, offvalue=0)
b61_12 = ttk.Checkbutton(content, variable=b61_12var, onvalue=1, offvalue=0)
b61_13 = ttk.Checkbutton(content, variable=b61_13var, onvalue=1, offvalue=0)
b61_14 = ttk.Checkbutton(content, variable=b61_14var, onvalue=1, offvalue=0)
b61_15 = ttk.Checkbutton(content, variable=b61_15var, onvalue=1, offvalue=0)
b61_17 = ttk.Checkbutton(content, text="HALT", variable=b61_17var, onvalue=1, offvalue=0)
trig_62 = ttk.Checkbutton(content, variable=trig_62var, onvalue=1, offvalue=0)

b62_0 = ttk.Checkbutton(content, variable=b62_0var, onvalue=1, offvalue=0)
b62_1 = ttk.Checkbutton(content, variable=b62_1var, onvalue=1, offvalue=0)
b62_2 = ttk.Checkbutton(content, variable=b62_2var, onvalue=1, offvalue=0)
b62_3 = ttk.Checkbutton(content, variable=b62_3var, onvalue=1, offvalue=0)
b62_4 = ttk.Checkbutton(content, variable=b62_4var, onvalue=1, offvalue=0)
b62_5 = ttk.Checkbutton(content, variable=b62_5var, onvalue=1, offvalue=0)
b62_6 = ttk.Checkbutton(content, variable=b62_6var, onvalue=1, offvalue=0)
b62_7 = ttk.Checkbutton(content, variable=b62_7var, onvalue=1, offvalue=0)
b62_8 = ttk.Checkbutton(content, variable=b62_8var, onvalue=1, offvalue=0)
b62_9 = ttk.Checkbutton(content, variable=b62_9var, onvalue=1, offvalue=0)
b62_10 = ttk.Checkbutton(content, variable=b62_10var, onvalue=1, offvalue=0)
b62_11 = ttk.Checkbutton(content, variable=b62_11var, onvalue=1, offvalue=0)
b62_12 = ttk.Checkbutton(content, variable=b62_12var, onvalue=1, offvalue=0)
b62_13 = ttk.Checkbutton(content, variable=b62_13var, onvalue=1, offvalue=0)
b62_14 = ttk.Checkbutton(content, variable=b62_14var, onvalue=1, offvalue=0)
b62_15 = ttk.Checkbutton(content, variable=b62_15var, onvalue=1, offvalue=0)
b62_17 = ttk.Checkbutton(content, text="HALT", variable=b62_17var, onvalue=1, offvalue=0)
trig_63 = ttk.Checkbutton(content, variable=trig_63var, onvalue=1, offvalue=0)

b63_0 = ttk.Checkbutton(content, variable=b63_0var, onvalue=1, offvalue=0)
b63_1 = ttk.Checkbutton(content, variable=b63_1var, onvalue=1, offvalue=0)
b63_2 = ttk.Checkbutton(content, variable=b63_2var, onvalue=1, offvalue=0)
b63_3 = ttk.Checkbutton(content, variable=b63_3var, onvalue=1, offvalue=0)
b63_4 = ttk.Checkbutton(content, variable=b63_4var, onvalue=1, offvalue=0)
b63_5 = ttk.Checkbutton(content, variable=b63_5var, onvalue=1, offvalue=0)
b63_6 = ttk.Checkbutton(content, variable=b63_6var, onvalue=1, offvalue=0)
b63_7 = ttk.Checkbutton(content, variable=b63_7var, onvalue=1, offvalue=0)
b63_8 = ttk.Checkbutton(content, variable=b63_8var, onvalue=1, offvalue=0)
b63_9 = ttk.Checkbutton(content, variable=b63_9var, onvalue=1, offvalue=0)
b63_10 = ttk.Checkbutton(content, variable=b63_10var, onvalue=1, offvalue=0)
b63_11 = ttk.Checkbutton(content, variable=b63_11var, onvalue=1, offvalue=0)
b63_12 = ttk.Checkbutton(content, variable=b63_12var, onvalue=1, offvalue=0)
b63_13 = ttk.Checkbutton(content, variable=b63_13var, onvalue=1, offvalue=0)
b63_14 = ttk.Checkbutton(content, variable=b63_14var, onvalue=1, offvalue=0)
b63_15 = ttk.Checkbutton(content, variable=b63_15var, onvalue=1, offvalue=0)
b63_17 = ttk.Checkbutton(content, text="HALT", variable=b63_17var, onvalue=1, offvalue=0)
trig_64 = ttk.Checkbutton(content, variable=trig_64var, onvalue=1, offvalue=0)

# Placing text beside each beat
nameb60_0.grid(column=1, row=62)
nameb61_0.grid(column=1, row=63)
nameb62_0.grid(column=1, row=64)
nameb63_0.grid(column=1, row=65)

# Placing buttons on grid
b60_0.grid(column=2,row=62)
b60_1.grid(column=3,row=62)
b60_2.grid(column=4,row=62)
b60_3.grid(column=5,row=62)
b60_4.grid(column=6,row=62)
b60_5.grid(column=7,row=62)
b60_6.grid(column=8,row=62)
b60_7.grid(column=9,row=62)
b60_8.grid(column=10,row=62)
b60_9.grid(column=11,row=62)
b60_10.grid(column=12,row=62)
b60_11.grid(column=13,row=62)
b60_12.grid(column=14,row=62)
b60_13.grid(column=15,row=62)
b60_14.grid(column=16,row=62)
b60_15.grid(column=17,row=62)
b60_17.grid(column=19,row=62)
trig_61.grid(column=25,row=62)

b61_0.grid(column=2,row=63)
b61_1.grid(column=3,row=63)
b61_2.grid(column=4,row=63)
b61_3.grid(column=5,row=63)
b61_4.grid(column=6,row=63)
b61_5.grid(column=7,row=63)
b61_6.grid(column=8,row=63)
b61_7.grid(column=9,row=63)
b61_8.grid(column=10,row=63)
b61_9.grid(column=11,row=63)
b61_10.grid(column=12,row=63)
b61_11.grid(column=13,row=63)
b61_12.grid(column=14,row=63)
b61_13.grid(column=15,row=63)
b61_14.grid(column=16,row=63)
b61_15.grid(column=17,row=63)
b61_17.grid(column=19,row=63)
trig_62.grid(column=25,row=63)

b62_0.grid(column=2,row=64)
b62_1.grid(column=3,row=64)
b62_2.grid(column=4,row=64)
b62_3.grid(column=5,row=64)
b62_4.grid(column=6,row=64)
b62_5.grid(column=7,row=64)
b62_6.grid(column=8,row=64)
b62_7.grid(column=9,row=64)
b62_8.grid(column=10,row=64)
b62_9.grid(column=11,row=64)
b62_10.grid(column=12,row=64)
b62_11.grid(column=13,row=64)
b62_12.grid(column=14,row=64)
b62_13.grid(column=15,row=64)
b62_14.grid(column=16,row=64)
b62_15.grid(column=17,row=64)
b62_17.grid(column=19,row=64)
trig_63.grid(column=25,row=64)

b63_0.grid(column=2,row=65)
b63_1.grid(column=3,row=65)
b63_2.grid(column=4,row=65)
b63_3.grid(column=5,row=65)
b63_4.grid(column=6,row=65)
b63_5.grid(column=7,row=65)
b63_6.grid(column=8,row=65)
b63_7.grid(column=9,row=65)
b63_8.grid(column=10,row=65)
b63_9.grid(column=11,row=65)
b63_10.grid(column=12,row=65)
b63_11.grid(column=13,row=65)
b63_12.grid(column=14,row=65)
b63_13.grid(column=15,row=65)
b63_14.grid(column=16,row=65)
b63_15.grid(column=17,row=65)
b63_17.grid(column=19,row=65)
trig_64.grid(column=25,row=65)

# Group 17

# defining labels
nameb64_0 = ttk.Label(content, text="Beat 65", background=c1.get())
nameb65_0 = ttk.Label(content, text="Beat 66", background=c1.get())
nameb66_0 = ttk.Label(content, text="Beat 67", background=c1.get())
nameb67_0 = ttk.Label(content, text="Beat 68", background=c1.get())

# Defining number type
b64_0var = IntVar()
b64_1var = IntVar()
b64_2var = IntVar()
b64_3var = IntVar()
b64_4var = IntVar()
b64_5var = IntVar()
b64_6var = IntVar()
b64_7var = IntVar()
b64_8var = IntVar()
b64_9var = IntVar()
b64_10var = IntVar()
b64_11var = IntVar()
b64_12var = IntVar()
b64_13var = IntVar()
b64_14var = IntVar()
b64_15var = IntVar()
b64_17var = IntVar()
trig_65var = IntVar()

b65_0var = IntVar()
b65_1var = IntVar()
b65_2var = IntVar()
b65_3var = IntVar()
b65_4var = IntVar()
b65_5var = IntVar()
b65_6var = IntVar()
b65_7var = IntVar()
b65_8var = IntVar()
b65_9var = IntVar()
b65_10var = IntVar()
b65_11var = IntVar()
b65_12var = IntVar()
b65_13var = IntVar()
b65_14var = IntVar()
b65_15var = IntVar()
b65_17var = IntVar()
trig_66var = IntVar()

b66_0var = IntVar()
b66_1var = IntVar()
b66_2var = IntVar()
b66_3var = IntVar()
b66_4var = IntVar()
b66_5var = IntVar()
b66_6var = IntVar()
b66_7var = IntVar()
b66_8var = IntVar()
b66_9var = IntVar()
b66_10var = IntVar()
b66_11var = IntVar()
b66_12var = IntVar()
b66_13var = IntVar()
b66_14var = IntVar()
b66_15var = IntVar()
b66_17var = IntVar()
trig_67var = IntVar()

b67_0var = IntVar()
b67_1var = IntVar()
b67_2var = IntVar()
b67_3var = IntVar()
b67_4var = IntVar()
b67_5var = IntVar()
b67_6var = IntVar()
b67_7var = IntVar()
b67_8var = IntVar()
b67_9var = IntVar()
b67_10var = IntVar()
b67_11var = IntVar()
b67_12var = IntVar()
b67_13var = IntVar()
b67_14var = IntVar()
b67_15var = IntVar()
b67_17var = IntVar()
trig_68var = IntVar()

# setting default button position
b64_0var.set(0)
b64_1var.set(0)
b64_2var.set(0)
b64_3var.set(0)
b64_4var.set(0)
b64_5var.set(0)
b64_6var.set(0)
b64_7var.set(0)
b64_8var.set(0)
b64_9var.set(0)
b64_10var.set(0)
b64_11var.set(0)
b64_12var.set(0)
b64_13var.set(0)
b64_14var.set(0)
b64_15var.set(0)
b64_17var.set(0)
trig_65var.set(0)

b65_0var.set(0)
b65_1var.set(0)
b65_2var.set(0)
b65_3var.set(0)
b65_4var.set(0)
b65_5var.set(0)
b65_6var.set(0)
b65_7var.set(0)
b65_8var.set(0)
b65_9var.set(0)
b65_10var.set(0)
b65_11var.set(0)
b65_12var.set(0)
b65_13var.set(0)
b65_14var.set(0)
b65_15var.set(0)
b65_17var.set(0)
trig_66var.set(0)

b66_0var.set(0)
b66_1var.set(0)
b66_2var.set(0)
b66_3var.set(0)
b66_4var.set(0)
b66_5var.set(0)
b66_6var.set(0)
b66_7var.set(0)
b66_8var.set(0)
b66_9var.set(0)
b66_10var.set(0)
b66_11var.set(0)
b66_12var.set(0)
b66_13var.set(0)
b66_14var.set(0)
b66_15var.set(0)
b66_17var.set(0)
trig_67var.set(0)

b67_0var.set(0)
b67_1var.set(0)
b67_2var.set(0)
b67_3var.set(0)
b67_4var.set(0)
b67_5var.set(0)
b67_6var.set(0)
b67_7var.set(0)
b67_8var.set(0)
b67_9var.set(0)
b67_10var.set(0)
b67_11var.set(0)
b67_12var.set(0)
b67_13var.set(0)
b67_14var.set(0)
b67_15var.set(0)
b67_17var.set(0)
trig_68var.set(0)

# defining button

b64_0 = ttk.Checkbutton(content, variable=b64_0var, onvalue=1, offvalue=0)
b64_1 = ttk.Checkbutton(content, variable=b64_1var, onvalue=1, offvalue=0)
b64_2 = ttk.Checkbutton(content, variable=b64_2var, onvalue=1, offvalue=0)
b64_3 = ttk.Checkbutton(content, variable=b64_3var, onvalue=1, offvalue=0)
b64_4 = ttk.Checkbutton(content, variable=b64_4var, onvalue=1, offvalue=0)
b64_5 = ttk.Checkbutton(content, variable=b64_5var, onvalue=1, offvalue=0)
b64_6 = ttk.Checkbutton(content, variable=b64_6var, onvalue=1, offvalue=0)
b64_7 = ttk.Checkbutton(content, variable=b64_7var, onvalue=1, offvalue=0)
b64_8 = ttk.Checkbutton(content, variable=b64_8var, onvalue=1, offvalue=0)
b64_9 = ttk.Checkbutton(content, variable=b64_9var, onvalue=1, offvalue=0)
b64_10 = ttk.Checkbutton(content, variable=b64_10var, onvalue=1, offvalue=0)
b64_11 = ttk.Checkbutton(content, variable=b64_11var, onvalue=1, offvalue=0)
b64_12 = ttk.Checkbutton(content, variable=b64_12var, onvalue=1, offvalue=0)
b64_13 = ttk.Checkbutton(content, variable=b64_13var, onvalue=1, offvalue=0)
b64_14 = ttk.Checkbutton(content, variable=b64_14var, onvalue=1, offvalue=0)
b64_15 = ttk.Checkbutton(content, variable=b64_15var, onvalue=1, offvalue=0)
b64_17 = ttk.Checkbutton(content, text="HALT", variable=b64_17var, onvalue=1, offvalue=0)
trig_65 = ttk.Checkbutton(content, variable=trig_65var, onvalue=1, offvalue=0)

b65_0 = ttk.Checkbutton(content, variable=b65_0var, onvalue=1, offvalue=0)
b65_1 = ttk.Checkbutton(content, variable=b65_1var, onvalue=1, offvalue=0)
b65_2 = ttk.Checkbutton(content, variable=b65_2var, onvalue=1, offvalue=0)
b65_3 = ttk.Checkbutton(content, variable=b65_3var, onvalue=1, offvalue=0)
b65_4 = ttk.Checkbutton(content, variable=b65_4var, onvalue=1, offvalue=0)
b65_5 = ttk.Checkbutton(content, variable=b65_5var, onvalue=1, offvalue=0)
b65_6 = ttk.Checkbutton(content, variable=b65_6var, onvalue=1, offvalue=0)
b65_7 = ttk.Checkbutton(content, variable=b65_7var, onvalue=1, offvalue=0)
b65_8 = ttk.Checkbutton(content, variable=b65_8var, onvalue=1, offvalue=0)
b65_9 = ttk.Checkbutton(content, variable=b65_9var, onvalue=1, offvalue=0)
b65_10 = ttk.Checkbutton(content, variable=b65_10var, onvalue=1, offvalue=0)
b65_11 = ttk.Checkbutton(content, variable=b65_11var, onvalue=1, offvalue=0)
b65_12 = ttk.Checkbutton(content, variable=b65_12var, onvalue=1, offvalue=0)
b65_13 = ttk.Checkbutton(content, variable=b65_13var, onvalue=1, offvalue=0)
b65_14 = ttk.Checkbutton(content, variable=b65_14var, onvalue=1, offvalue=0)
b65_15 = ttk.Checkbutton(content, variable=b65_15var, onvalue=1, offvalue=0)
b65_17 = ttk.Checkbutton(content, text="HALT", variable=b65_17var, onvalue=1, offvalue=0)
trig_66 = ttk.Checkbutton(content, variable=trig_66var, onvalue=1, offvalue=0)

b66_0 = ttk.Checkbutton(content, variable=b66_0var, onvalue=1, offvalue=0)
b66_1 = ttk.Checkbutton(content, variable=b66_1var, onvalue=1, offvalue=0)
b66_2 = ttk.Checkbutton(content, variable=b66_2var, onvalue=1, offvalue=0)
b66_3 = ttk.Checkbutton(content, variable=b66_3var, onvalue=1, offvalue=0)
b66_4 = ttk.Checkbutton(content, variable=b66_4var, onvalue=1, offvalue=0)
b66_5 = ttk.Checkbutton(content, variable=b66_5var, onvalue=1, offvalue=0)
b66_6 = ttk.Checkbutton(content, variable=b66_6var, onvalue=1, offvalue=0)
b66_7 = ttk.Checkbutton(content, variable=b66_7var, onvalue=1, offvalue=0)
b66_8 = ttk.Checkbutton(content, variable=b66_8var, onvalue=1, offvalue=0)
b66_9 = ttk.Checkbutton(content, variable=b66_9var, onvalue=1, offvalue=0)
b66_10 = ttk.Checkbutton(content, variable=b66_10var, onvalue=1, offvalue=0)
b66_11 = ttk.Checkbutton(content, variable=b66_11var, onvalue=1, offvalue=0)
b66_12 = ttk.Checkbutton(content, variable=b66_12var, onvalue=1, offvalue=0)
b66_13 = ttk.Checkbutton(content, variable=b66_13var, onvalue=1, offvalue=0)
b66_14 = ttk.Checkbutton(content, variable=b66_14var, onvalue=1, offvalue=0)
b66_15 = ttk.Checkbutton(content, variable=b66_15var, onvalue=1, offvalue=0)
b66_17 = ttk.Checkbutton(content, text="HALT", variable=b66_17var, onvalue=1, offvalue=0)
trig_67 = ttk.Checkbutton(content, variable=trig_67var, onvalue=1, offvalue=0)

b67_0 = ttk.Checkbutton(content, variable=b67_0var, onvalue=1, offvalue=0)
b67_1 = ttk.Checkbutton(content, variable=b67_1var, onvalue=1, offvalue=0)
b67_2 = ttk.Checkbutton(content, variable=b67_2var, onvalue=1, offvalue=0)
b67_3 = ttk.Checkbutton(content, variable=b67_3var, onvalue=1, offvalue=0)
b67_4 = ttk.Checkbutton(content, variable=b67_4var, onvalue=1, offvalue=0)
b67_5 = ttk.Checkbutton(content, variable=b67_5var, onvalue=1, offvalue=0)
b67_6 = ttk.Checkbutton(content, variable=b67_6var, onvalue=1, offvalue=0)
b67_7 = ttk.Checkbutton(content, variable=b67_7var, onvalue=1, offvalue=0)
b67_8 = ttk.Checkbutton(content, variable=b67_8var, onvalue=1, offvalue=0)
b67_9 = ttk.Checkbutton(content, variable=b67_9var, onvalue=1, offvalue=0)
b67_10 = ttk.Checkbutton(content, variable=b67_10var, onvalue=1, offvalue=0)
b67_11 = ttk.Checkbutton(content, variable=b67_11var, onvalue=1, offvalue=0)
b67_12 = ttk.Checkbutton(content, variable=b67_12var, onvalue=1, offvalue=0)
b67_13 = ttk.Checkbutton(content, variable=b67_13var, onvalue=1, offvalue=0)
b67_14 = ttk.Checkbutton(content, variable=b67_14var, onvalue=1, offvalue=0)
b67_15 = ttk.Checkbutton(content, variable=b67_15var, onvalue=1, offvalue=0)
b67_17 = ttk.Checkbutton(content, text="HALT", variable=b67_17var, onvalue=1, offvalue=0)
trig_68 = ttk.Checkbutton(content, variable=trig_68var, onvalue=1, offvalue=0)

# placing text beside each beat
nameb64_0.grid(column=1, row=66)
nameb65_0.grid(column=1, row=67)
nameb66_0.grid(column=1, row=68)
nameb67_0.grid(column=1, row=69)


# placing buttons on grid
b64_0.grid(column=2,row=66)
b64_1.grid(column=3,row=66)
b64_2.grid(column=4,row=66)
b64_3.grid(column=5,row=66)
b64_4.grid(column=6,row=66)
b64_5.grid(column=7,row=66)
b64_6.grid(column=8,row=66)
b64_7.grid(column=9,row=66)
b64_8.grid(column=10,row=66)
b64_9.grid(column=11,row=66)
b64_10.grid(column=12,row=66)
b64_11.grid(column=13,row=66)
b64_12.grid(column=14,row=66)
b64_13.grid(column=15,row=66)
b64_14.grid(column=16,row=66)
b64_15.grid(column=17,row=66)
b64_17.grid(column=19,row=66)
trig_65.grid(column=25,row=66)

b65_0.grid(column=2,row=67)
b65_1.grid(column=3,row=67)
b65_2.grid(column=4,row=67)
b65_3.grid(column=5,row=67)
b65_4.grid(column=6,row=67)
b65_5.grid(column=7,row=67)
b65_6.grid(column=8,row=67)
b65_7.grid(column=9,row=67)
b65_8.grid(column=10,row=67)
b65_9.grid(column=11,row=67)
b65_10.grid(column=12,row=67)
b65_11.grid(column=13,row=67)
b65_12.grid(column=14,row=67)
b65_13.grid(column=15,row=67)
b65_14.grid(column=16,row=67)
b65_15.grid(column=17,row=67)
b65_17.grid(column=19,row=67)
trig_66.grid(column=25,row=67)

b66_0.grid(column=2,row=68)
b66_1.grid(column=3,row=68)
b66_2.grid(column=4,row=68)
b66_3.grid(column=5,row=68)
b66_4.grid(column=6,row=68)
b66_5.grid(column=7,row=68)
b66_6.grid(column=8,row=68)
b66_7.grid(column=9,row=68)
b66_8.grid(column=10,row=68)
b66_9.grid(column=11,row=68)
b66_10.grid(column=12,row=68)
b66_11.grid(column=13,row=68)
b66_12.grid(column=14,row=68)
b66_13.grid(column=15,row=68)
b66_14.grid(column=16,row=68)
b66_15.grid(column=17,row=68)
b66_17.grid(column=19,row=68)
trig_67.grid(column=25,row=68)

b67_0.grid(column=2,row=69)
b67_1.grid(column=3,row=69)
b67_2.grid(column=4,row=69)
b67_3.grid(column=5,row=69)
b67_4.grid(column=6,row=69)
b67_5.grid(column=7,row=69)
b67_6.grid(column=8,row=69)
b67_7.grid(column=9,row=69)
b67_8.grid(column=10,row=69)
b67_9.grid(column=11,row=69)
b67_10.grid(column=12,row=69)
b67_11.grid(column=13,row=69)
b67_12.grid(column=14,row=69)
b67_13.grid(column=15,row=69)
b67_14.grid(column=16,row=69)
b67_15.grid(column=17,row=69)
b67_17.grid(column=19,row=69)
trig_68.grid(column=25,row=69)

# group 18

# defining labels
nameb68_0 = ttk.Label(content, text="Beat 69", background=c1.get())
nameb69_0 = ttk.Label(content, text="Beat 70", background=c1.get())
nameb70_0 = ttk.Label(content, text="Beat 71", background=c1.get())
nameb71_0 = ttk.Label(content, text="Beat 72", background=c1.get())


# Defining number type
b68_0var = IntVar()
b68_1var = IntVar()
b68_2var = IntVar()
b68_3var = IntVar()
b68_4var = IntVar()
b68_5var = IntVar()
b68_6var = IntVar()
b68_7var = IntVar()
b68_8var = IntVar()
b68_9var = IntVar()
b68_10var = IntVar()
b68_11var = IntVar()
b68_12var = IntVar()
b68_13var = IntVar()
b68_14var = IntVar()
b68_15var = IntVar()
b68_17var = IntVar()
trig_69var = IntVar()

b69_0var = IntVar()
b69_1var = IntVar()
b69_2var = IntVar()
b69_3var = IntVar()
b69_4var = IntVar()
b69_5var = IntVar()
b69_6var = IntVar()
b69_7var = IntVar()
b69_8var = IntVar()
b69_9var = IntVar()
b69_10var = IntVar()
b69_11var = IntVar()
b69_12var = IntVar()
b69_13var = IntVar()
b69_14var = IntVar()
b69_15var = IntVar()
b69_17var = IntVar()
trig_70var = IntVar()

b70_0var = IntVar()
b70_1var = IntVar()
b70_2var = IntVar()
b70_3var = IntVar()
b70_4var = IntVar()
b70_5var = IntVar()
b70_6var = IntVar()
b70_7var = IntVar()
b70_8var = IntVar()
b70_9var = IntVar()
b70_10var = IntVar()
b70_11var = IntVar()
b70_12var = IntVar()
b70_13var = IntVar()
b70_14var = IntVar()
b70_15var = IntVar()
b70_17var = IntVar()
trig_71var = IntVar()

b71_0var = IntVar()
b71_1var = IntVar()
b71_2var = IntVar()
b71_3var = IntVar()
b71_4var = IntVar()
b71_5var = IntVar()
b71_6var = IntVar()
b71_7var = IntVar()
b71_8var = IntVar()
b71_9var = IntVar()
b71_10var = IntVar()
b71_11var = IntVar()
b71_12var = IntVar()
b71_13var = IntVar()
b71_14var = IntVar()
b71_15var = IntVar()
b71_17var = IntVar()
trig_72var = IntVar()

# Setting default button position
b68_0var.set(0)
b68_1var.set(0)
b68_2var.set(0)
b68_3var.set(0)
b68_4var.set(0)
b68_5var.set(0)
b68_6var.set(0)
b68_7var.set(0)
b68_8var.set(0)
b68_9var.set(0)
b68_10var.set(0)
b68_11var.set(0)
b68_12var.set(0)
b68_13var.set(0)
b68_14var.set(0)
b68_15var.set(0)
b68_17var.set(0)
trig_69var.set(0)

b69_0var.set(0)
b69_1var.set(0)
b69_2var.set(0)
b69_3var.set(0)
b69_4var.set(0)
b69_5var.set(0)
b69_6var.set(0)
b69_7var.set(0)
b69_8var.set(0)
b69_9var.set(0)
b69_10var.set(0)
b69_11var.set(0)
b69_12var.set(0)
b69_13var.set(0)
b69_14var.set(0)
b69_15var.set(0)
b69_17var.set(0)
trig_70var.set(0)

b70_0var.set(0)
b70_1var.set(0)
b70_2var.set(0)
b70_3var.set(0)
b70_4var.set(0)
b70_5var.set(0)
b70_6var.set(0)
b70_7var.set(0)
b70_8var.set(0)
b70_9var.set(0)
b70_10var.set(0)
b70_11var.set(0)
b70_12var.set(0)
b70_13var.set(0)
b70_14var.set(0)
b70_15var.set(0)
b70_17var.set(0)
trig_71var.set(0)

b71_0var.set(0)
b71_1var.set(0)
b71_2var.set(0)
b71_3var.set(0)
b71_4var.set(0)
b71_5var.set(0)
b71_6var.set(0)
b71_7var.set(0)
b71_8var.set(0)
b71_9var.set(0)
b71_10var.set(0)
b71_11var.set(0)
b71_12var.set(0)
b71_13var.set(0)
b71_14var.set(0)
b71_15var.set(0)
b71_17var.set(0)
trig_72var.set(0)

# Defining button
b68_0 = ttk.Checkbutton(content, variable=b68_0var, onvalue=1, offvalue=0)
b68_1 = ttk.Checkbutton(content, variable=b68_1var, onvalue=1, offvalue=0)
b68_2 = ttk.Checkbutton(content, variable=b68_2var, onvalue=1, offvalue=0)
b68_3 = ttk.Checkbutton(content, variable=b68_3var, onvalue=1, offvalue=0)
b68_4 = ttk.Checkbutton(content, variable=b68_4var, onvalue=1, offvalue=0)
b68_5 = ttk.Checkbutton(content, variable=b68_5var, onvalue=1, offvalue=0)
b68_6 = ttk.Checkbutton(content, variable=b68_6var, onvalue=1, offvalue=0)
b68_7 = ttk.Checkbutton(content, variable=b68_7var, onvalue=1, offvalue=0)
b68_8 = ttk.Checkbutton(content, variable=b68_8var, onvalue=1, offvalue=0)
b68_9 = ttk.Checkbutton(content, variable=b68_9var, onvalue=1, offvalue=0)
b68_10 = ttk.Checkbutton(content, variable=b68_10var, onvalue=1, offvalue=0)
b68_11 = ttk.Checkbutton(content, variable=b68_11var, onvalue=1, offvalue=0)
b68_12 = ttk.Checkbutton(content, variable=b68_12var, onvalue=1, offvalue=0)
b68_13 = ttk.Checkbutton(content, variable=b68_13var, onvalue=1, offvalue=0)
b68_14 = ttk.Checkbutton(content, variable=b68_14var, onvalue=1, offvalue=0)
b68_15 = ttk.Checkbutton(content, variable=b68_15var, onvalue=1, offvalue=0)
b68_17 = ttk.Checkbutton(content, text="HALT", variable=b68_17var, onvalue=1, offvalue=0)
trig_69 = ttk.Checkbutton(content, variable=trig_69var, onvalue=1, offvalue=0)

b69_0 = ttk.Checkbutton(content, variable=b69_0var, onvalue=1, offvalue=0)
b69_1 = ttk.Checkbutton(content, variable=b69_1var, onvalue=1, offvalue=0)
b69_2 = ttk.Checkbutton(content, variable=b69_2var, onvalue=1, offvalue=0)
b69_3 = ttk.Checkbutton(content, variable=b69_3var, onvalue=1, offvalue=0)
b69_4 = ttk.Checkbutton(content, variable=b69_4var, onvalue=1, offvalue=0)
b69_5 = ttk.Checkbutton(content, variable=b69_5var, onvalue=1, offvalue=0)
b69_6 = ttk.Checkbutton(content, variable=b69_6var, onvalue=1, offvalue=0)
b69_7 = ttk.Checkbutton(content, variable=b69_7var, onvalue=1, offvalue=0)
b69_8 = ttk.Checkbutton(content, variable=b69_8var, onvalue=1, offvalue=0)
b69_9 = ttk.Checkbutton(content, variable=b69_9var, onvalue=1, offvalue=0)
b69_10 = ttk.Checkbutton(content, variable=b69_10var, onvalue=1, offvalue=0)
b69_11 = ttk.Checkbutton(content, variable=b69_11var, onvalue=1, offvalue=0)
b69_12 = ttk.Checkbutton(content, variable=b69_12var, onvalue=1, offvalue=0)
b69_13 = ttk.Checkbutton(content, variable=b69_13var, onvalue=1, offvalue=0)
b69_14 = ttk.Checkbutton(content, variable=b69_14var, onvalue=1, offvalue=0)
b69_15 = ttk.Checkbutton(content, variable=b69_15var, onvalue=1, offvalue=0)
b69_17 = ttk.Checkbutton(content, text="HALT", variable=b69_17var, onvalue=1, offvalue=0)
trig_70 = ttk.Checkbutton(content, variable=trig_70var, onvalue=1, offvalue=0)

b70_0 = ttk.Checkbutton(content, variable=b70_0var, onvalue=1, offvalue=0)
b70_1 = ttk.Checkbutton(content, variable=b70_1var, onvalue=1, offvalue=0)
b70_2 = ttk.Checkbutton(content, variable=b70_2var, onvalue=1, offvalue=0)
b70_3 = ttk.Checkbutton(content, variable=b70_3var, onvalue=1, offvalue=0)
b70_4 = ttk.Checkbutton(content, variable=b70_4var, onvalue=1, offvalue=0)
b70_5 = ttk.Checkbutton(content, variable=b70_5var, onvalue=1, offvalue=0)
b70_6 = ttk.Checkbutton(content, variable=b70_6var, onvalue=1, offvalue=0)
b70_7 = ttk.Checkbutton(content, variable=b70_7var, onvalue=1, offvalue=0)
b70_8 = ttk.Checkbutton(content, variable=b70_8var, onvalue=1, offvalue=0)
b70_9 = ttk.Checkbutton(content, variable=b70_9var, onvalue=1, offvalue=0)
b70_10 = ttk.Checkbutton(content, variable=b70_10var, onvalue=1, offvalue=0)
b70_11 = ttk.Checkbutton(content, variable=b70_11var, onvalue=1, offvalue=0)
b70_12 = ttk.Checkbutton(content, variable=b70_12var, onvalue=1, offvalue=0)
b70_13 = ttk.Checkbutton(content, variable=b70_13var, onvalue=1, offvalue=0)
b70_14 = ttk.Checkbutton(content, variable=b70_14var, onvalue=1, offvalue=0)
b70_15 = ttk.Checkbutton(content, variable=b70_15var, onvalue=1, offvalue=0)
b70_17 = ttk.Checkbutton(content, text="HALT", variable=b70_17var, onvalue=1, offvalue=0)
trig_71 = ttk.Checkbutton(content, variable=trig_71var, onvalue=1, offvalue=0)

b71_0 = ttk.Checkbutton(content, variable=b71_0var, onvalue=1, offvalue=0)
b71_1 = ttk.Checkbutton(content, variable=b71_1var, onvalue=1, offvalue=0)
b71_2 = ttk.Checkbutton(content, variable=b71_2var, onvalue=1, offvalue=0)
b71_3 = ttk.Checkbutton(content, variable=b71_3var, onvalue=1, offvalue=0)
b71_4 = ttk.Checkbutton(content, variable=b71_4var, onvalue=1, offvalue=0)
b71_5 = ttk.Checkbutton(content, variable=b71_5var, onvalue=1, offvalue=0)
b71_6 = ttk.Checkbutton(content, variable=b71_6var, onvalue=1, offvalue=0)
b71_7 = ttk.Checkbutton(content, variable=b71_7var, onvalue=1, offvalue=0)
b71_8 = ttk.Checkbutton(content, variable=b71_8var, onvalue=1, offvalue=0)
b71_9 = ttk.Checkbutton(content, variable=b71_9var, onvalue=1, offvalue=0)
b71_10 = ttk.Checkbutton(content, variable=b71_10var, onvalue=1, offvalue=0)
b71_11 = ttk.Checkbutton(content, variable=b71_11var, onvalue=1, offvalue=0)
b71_12 = ttk.Checkbutton(content, variable=b71_12var, onvalue=1, offvalue=0)
b71_13 = ttk.Checkbutton(content, variable=b71_13var, onvalue=1, offvalue=0)
b71_14 = ttk.Checkbutton(content, variable=b71_14var, onvalue=1, offvalue=0)
b71_15 = ttk.Checkbutton(content, variable=b71_15var, onvalue=1, offvalue=0)
b71_17 = ttk.Checkbutton(content, text="HALT", variable=b71_17var, onvalue=1, offvalue=0)
trig_72 = ttk.Checkbutton(content, variable=trig_72var, onvalue=1, offvalue=0)

# Placing text beside each beat
nameb68_0.grid(column=1, row=70)
nameb69_0.grid(column=1, row=71)
nameb70_0.grid(column=1, row=72)
nameb71_0.grid(column=1, row=73)

# Placing buttons on grid
b68_0.grid(column=2,row=70)
b68_1.grid(column=3,row=70)
b68_2.grid(column=4,row=70)
b68_3.grid(column=5,row=70)
b68_4.grid(column=6,row=70)
b68_5.grid(column=7,row=70)
b68_6.grid(column=8,row=70)
b68_7.grid(column=9,row=70)
b68_8.grid(column=10,row=70)
b68_9.grid(column=11,row=70)
b68_10.grid(column=12,row=70)
b68_11.grid(column=13,row=70)
b68_12.grid(column=14,row=70)
b68_13.grid(column=15,row=70)
b68_14.grid(column=16,row=70)
b68_15.grid(column=17,row=70)
b68_17.grid(column=19,row=70)
trig_69.grid(column=25,row=70)

b69_0.grid(column=2,row=71)
b69_1.grid(column=3,row=71)
b69_2.grid(column=4,row=71)
b69_3.grid(column=5,row=71)
b69_4.grid(column=6,row=71)
b69_5.grid(column=7,row=71)
b69_6.grid(column=8,row=71)
b69_7.grid(column=9,row=71)
b69_8.grid(column=10,row=71)
b69_9.grid(column=11,row=71)
b69_10.grid(column=12,row=71)
b69_11.grid(column=13,row=71)
b69_12.grid(column=14,row=71)
b69_13.grid(column=15,row=71)
b69_14.grid(column=16,row=71)
b69_15.grid(column=17,row=71)
b69_17.grid(column=19,row=71)
trig_70.grid(column=25,row=71)

b70_0.grid(column=2,row=72)
b70_1.grid(column=3,row=72)
b70_2.grid(column=4,row=72)
b70_3.grid(column=5,row=72)
b70_4.grid(column=6,row=72)
b70_5.grid(column=7,row=72)
b70_6.grid(column=8,row=72)
b70_7.grid(column=9,row=72)
b70_8.grid(column=10,row=72)
b70_9.grid(column=11,row=72)
b70_10.grid(column=12,row=72)
b70_11.grid(column=13,row=72)
b70_12.grid(column=14,row=72)
b70_13.grid(column=15,row=72)
b70_14.grid(column=16,row=72)
b70_15.grid(column=17,row=72)
b70_17.grid(column=19,row=72)
trig_71.grid(column=25,row=72)

b71_0.grid(column=2,row=73)
b71_1.grid(column=3,row=73)
b71_2.grid(column=4,row=73)
b71_3.grid(column=5,row=73)
b71_4.grid(column=6,row=73)
b71_5.grid(column=7,row=73)
b71_6.grid(column=8,row=73)
b71_7.grid(column=9,row=73)
b71_8.grid(column=10,row=73)
b71_9.grid(column=11,row=73)
b71_10.grid(column=12,row=73)
b71_11.grid(column=13,row=73)
b71_12.grid(column=14,row=73)
b71_13.grid(column=15,row=73)
b71_14.grid(column=16,row=73)
b71_15.grid(column=17,row=73)
b71_17.grid(column=19,row=73)
trig_72.grid(column=25,row=73)

# Group 19

# defining labels
nameb72_0 = ttk.Label(content, text="Beat 73", background=c1.get())
nameb73_0 = ttk.Label(content, text="Beat 74", background=c1.get())
nameb74_0 = ttk.Label(content, text="Beat 75", background=c1.get())
nameb75_0 = ttk.Label(content, text="Beat 76", background=c1.get())


# Defining number type
b72_0var = IntVar()
b72_1var = IntVar()
b72_2var = IntVar()
b72_3var = IntVar()
b72_4var = IntVar()
b72_5var = IntVar()
b72_6var = IntVar()
b72_7var = IntVar()
b72_8var = IntVar()
b72_9var = IntVar()
b72_10var = IntVar()
b72_11var = IntVar()
b72_12var = IntVar()
b72_13var = IntVar()
b72_14var = IntVar()
b72_15var = IntVar()
b72_17var = IntVar()
trig_73var = IntVar()

b73_0var = IntVar()
b73_1var = IntVar()
b73_2var = IntVar()
b73_3var = IntVar()
b73_4var = IntVar()
b73_5var = IntVar()
b73_6var = IntVar()
b73_7var = IntVar()
b73_8var = IntVar()
b73_9var = IntVar()
b73_10var = IntVar()
b73_11var = IntVar()
b73_12var = IntVar()
b73_13var = IntVar()
b73_14var = IntVar()
b73_15var = IntVar()
b73_17var = IntVar()
trig_74var = IntVar()

b74_0var = IntVar()
b74_1var = IntVar()
b74_2var = IntVar()
b74_3var = IntVar()
b74_4var = IntVar()
b74_5var = IntVar()
b74_6var = IntVar()
b74_7var = IntVar()
b74_8var = IntVar()
b74_9var = IntVar()
b74_10var = IntVar()
b74_11var = IntVar()
b74_12var = IntVar()
b74_13var = IntVar()
b74_14var = IntVar()
b74_15var = IntVar()
b74_17var = IntVar()
trig_75var = IntVar()

b75_0var = IntVar()
b75_1var = IntVar()
b75_2var = IntVar()
b75_3var = IntVar()
b75_4var = IntVar()
b75_5var = IntVar()
b75_6var = IntVar()
b75_7var = IntVar()
b75_8var = IntVar()
b75_9var = IntVar()
b75_10var = IntVar()
b75_11var = IntVar()
b75_12var = IntVar()
b75_13var = IntVar()
b75_14var = IntVar()
b75_15var = IntVar()
b75_17var = IntVar()
trig_76var = IntVar()

# Setting default button position
b72_0var.set(0)
b72_1var.set(0)
b72_2var.set(0)
b72_3var.set(0)
b72_4var.set(0)
b72_5var.set(0)
b72_6var.set(0)
b72_7var.set(0)
b72_8var.set(0)
b72_9var.set(0)
b72_10var.set(0)
b72_11var.set(0)
b72_12var.set(0)
b72_13var.set(0)
b72_14var.set(0)
b72_15var.set(0)
b72_17var.set(0)
trig_73var.set(0)

b73_0var.set(0)
b73_1var.set(0)
b73_2var.set(0)
b73_3var.set(0)
b73_4var.set(0)
b73_5var.set(0)
b73_6var.set(0)
b73_7var.set(0)
b73_8var.set(0)
b73_9var.set(0)
b73_10var.set(0)
b73_11var.set(0)
b73_12var.set(0)
b73_13var.set(0)
b73_14var.set(0)
b73_15var.set(0)
b73_17var.set(0)
trig_74var.set(0)

b74_0var.set(0)
b74_1var.set(0)
b74_2var.set(0)
b74_3var.set(0)
b74_4var.set(0)
b74_5var.set(0)
b74_6var.set(0)
b74_7var.set(0)
b74_8var.set(0)
b74_9var.set(0)
b74_10var.set(0)
b74_11var.set(0)
b74_12var.set(0)
b74_13var.set(0)
b74_14var.set(0)
b74_15var.set(0)
b74_17var.set(0)
trig_75var.set(0)

b75_0var.set(0)
b75_1var.set(0)
b75_2var.set(0)
b75_3var.set(0)
b75_4var.set(0)
b75_5var.set(0)
b75_6var.set(0)
b75_7var.set(0)
b75_8var.set(0)
b75_9var.set(0)
b75_10var.set(0)
b75_11var.set(0)
b75_12var.set(0)
b75_13var.set(0)
b75_14var.set(0)
b75_15var.set(0)
b75_17var.set(0)
trig_76var.set(0)

# Defining button
b72_0 = ttk.Checkbutton(content, variable=b72_0var, onvalue=1, offvalue=0)
b72_1 = ttk.Checkbutton(content, variable=b72_1var, onvalue=1, offvalue=0)
b72_2 = ttk.Checkbutton(content, variable=b72_2var, onvalue=1, offvalue=0)
b72_3 = ttk.Checkbutton(content, variable=b72_3var, onvalue=1, offvalue=0)
b72_4 = ttk.Checkbutton(content, variable=b72_4var, onvalue=1, offvalue=0)
b72_5 = ttk.Checkbutton(content, variable=b72_5var, onvalue=1, offvalue=0)
b72_6 = ttk.Checkbutton(content, variable=b72_6var, onvalue=1, offvalue=0)
b72_7 = ttk.Checkbutton(content, variable=b72_7var, onvalue=1, offvalue=0)
b72_8 = ttk.Checkbutton(content, variable=b72_8var, onvalue=1, offvalue=0)
b72_9 = ttk.Checkbutton(content, variable=b72_9var, onvalue=1, offvalue=0)
b72_10 = ttk.Checkbutton(content, variable=b72_10var, onvalue=1, offvalue=0)
b72_11 = ttk.Checkbutton(content, variable=b72_11var, onvalue=1, offvalue=0)
b72_12 = ttk.Checkbutton(content, variable=b72_12var, onvalue=1, offvalue=0)
b72_13 = ttk.Checkbutton(content, variable=b72_13var, onvalue=1, offvalue=0)
b72_14 = ttk.Checkbutton(content, variable=b72_14var, onvalue=1, offvalue=0)
b72_15 = ttk.Checkbutton(content, variable=b72_15var, onvalue=1, offvalue=0)
b72_17 = ttk.Checkbutton(content, text="HALT", variable=b72_17var, onvalue=1, offvalue=0)
trig_73 = ttk.Checkbutton(content, variable=trig_73var, onvalue=1, offvalue=0)

b73_0 = ttk.Checkbutton(content, variable=b73_0var, onvalue=1, offvalue=0)
b73_1 = ttk.Checkbutton(content, variable=b73_1var, onvalue=1, offvalue=0)
b73_2 = ttk.Checkbutton(content, variable=b73_2var, onvalue=1, offvalue=0)
b73_3 = ttk.Checkbutton(content, variable=b73_3var, onvalue=1, offvalue=0)
b73_4 = ttk.Checkbutton(content, variable=b73_4var, onvalue=1, offvalue=0)
b73_5 = ttk.Checkbutton(content, variable=b73_5var, onvalue=1, offvalue=0)
b73_6 = ttk.Checkbutton(content, variable=b73_6var, onvalue=1, offvalue=0)
b73_7 = ttk.Checkbutton(content, variable=b73_7var, onvalue=1, offvalue=0)
b73_8 = ttk.Checkbutton(content, variable=b73_8var, onvalue=1, offvalue=0)
b73_9 = ttk.Checkbutton(content, variable=b73_9var, onvalue=1, offvalue=0)
b73_10 = ttk.Checkbutton(content, variable=b73_10var, onvalue=1, offvalue=0)
b73_11 = ttk.Checkbutton(content, variable=b73_11var, onvalue=1, offvalue=0)
b73_12 = ttk.Checkbutton(content, variable=b73_12var, onvalue=1, offvalue=0)
b73_13 = ttk.Checkbutton(content, variable=b73_13var, onvalue=1, offvalue=0)
b73_14 = ttk.Checkbutton(content, variable=b73_14var, onvalue=1, offvalue=0)
b73_15 = ttk.Checkbutton(content, variable=b73_15var, onvalue=1, offvalue=0)
b73_17 = ttk.Checkbutton(content, text="HALT", variable=b73_17var, onvalue=1, offvalue=0)
trig_74 = ttk.Checkbutton(content, variable=trig_74var, onvalue=1, offvalue=0)

b74_0 = ttk.Checkbutton(content, variable=b74_0var, onvalue=1, offvalue=0)
b74_1 = ttk.Checkbutton(content, variable=b74_1var, onvalue=1, offvalue=0)
b74_2 = ttk.Checkbutton(content, variable=b74_2var, onvalue=1, offvalue=0)
b74_3 = ttk.Checkbutton(content, variable=b74_3var, onvalue=1, offvalue=0)
b74_4 = ttk.Checkbutton(content, variable=b74_4var, onvalue=1, offvalue=0)
b74_5 = ttk.Checkbutton(content, variable=b74_5var, onvalue=1, offvalue=0)
b74_6 = ttk.Checkbutton(content, variable=b74_6var, onvalue=1, offvalue=0)
b74_7 = ttk.Checkbutton(content, variable=b74_7var, onvalue=1, offvalue=0)
b74_8 = ttk.Checkbutton(content, variable=b74_8var, onvalue=1, offvalue=0)
b74_9 = ttk.Checkbutton(content, variable=b74_9var, onvalue=1, offvalue=0)
b74_10 = ttk.Checkbutton(content, variable=b74_10var, onvalue=1, offvalue=0)
b74_11 = ttk.Checkbutton(content, variable=b74_11var, onvalue=1, offvalue=0)
b74_12 = ttk.Checkbutton(content, variable=b74_12var, onvalue=1, offvalue=0)
b74_13 = ttk.Checkbutton(content, variable=b74_13var, onvalue=1, offvalue=0)
b74_14 = ttk.Checkbutton(content, variable=b74_14var, onvalue=1, offvalue=0)
b74_15 = ttk.Checkbutton(content, variable=b74_15var, onvalue=1, offvalue=0)
b74_17 = ttk.Checkbutton(content, text="HALT", variable=b74_17var, onvalue=1, offvalue=0)
trig_75 = ttk.Checkbutton(content, variable=trig_75var, onvalue=1, offvalue=0)

b75_0 = ttk.Checkbutton(content, variable=b75_0var, onvalue=1, offvalue=0)
b75_1 = ttk.Checkbutton(content, variable=b75_1var, onvalue=1, offvalue=0)
b75_2 = ttk.Checkbutton(content, variable=b75_2var, onvalue=1, offvalue=0)
b75_3 = ttk.Checkbutton(content, variable=b75_3var, onvalue=1, offvalue=0)
b75_4 = ttk.Checkbutton(content, variable=b75_4var, onvalue=1, offvalue=0)
b75_5 = ttk.Checkbutton(content, variable=b75_5var, onvalue=1, offvalue=0)
b75_6 = ttk.Checkbutton(content, variable=b75_6var, onvalue=1, offvalue=0)
b75_7 = ttk.Checkbutton(content, variable=b75_7var, onvalue=1, offvalue=0)
b75_8 = ttk.Checkbutton(content, variable=b75_8var, onvalue=1, offvalue=0)
b75_9 = ttk.Checkbutton(content, variable=b75_9var, onvalue=1, offvalue=0)
b75_10 = ttk.Checkbutton(content, variable=b75_10var, onvalue=1, offvalue=0)
b75_11 = ttk.Checkbutton(content, variable=b75_11var, onvalue=1, offvalue=0)
b75_12 = ttk.Checkbutton(content, variable=b75_12var, onvalue=1, offvalue=0)
b75_13 = ttk.Checkbutton(content, variable=b75_13var, onvalue=1, offvalue=0)
b75_14 = ttk.Checkbutton(content, variable=b75_14var, onvalue=1, offvalue=0)
b75_15 = ttk.Checkbutton(content, variable=b75_15var, onvalue=1, offvalue=0)
b75_17 = ttk.Checkbutton(content, text="HALT", variable=b75_17var, onvalue=1, offvalue=0)
trig_76 = ttk.Checkbutton(content, variable=trig_76var, onvalue=1, offvalue=0)

# Placing text beside each beat
nameb72_0.grid(column=1, row=74)
nameb73_0.grid(column=1, row=75)
nameb74_0.grid(column=1, row=76)
nameb75_0.grid(column=1, row=77)

# Placing buttons on grid
b72_0.grid(column=2,row=74)
b72_1.grid(column=3,row=74)
b72_2.grid(column=4,row=74)
b72_3.grid(column=5,row=74)
b72_4.grid(column=6,row=74)
b72_5.grid(column=7,row=74)
b72_6.grid(column=8,row=74)
b72_7.grid(column=9,row=74)
b72_8.grid(column=10,row=74)
b72_9.grid(column=11,row=74)
b72_10.grid(column=12,row=74)
b72_11.grid(column=13,row=74)
b72_12.grid(column=14,row=74)
b72_13.grid(column=15,row=74)
b72_14.grid(column=16,row=74)
b72_15.grid(column=17,row=74)
b72_17.grid(column=19,row=74)
trig_73.grid(column=25,row=74)

b73_0.grid(column=2,row=75)
b73_1.grid(column=3,row=75)
b73_2.grid(column=4,row=75)
b73_3.grid(column=5,row=75)
b73_4.grid(column=6,row=75)
b73_5.grid(column=7,row=75)
b73_6.grid(column=8,row=75)
b73_7.grid(column=9,row=75)
b73_8.grid(column=10,row=75)
b73_9.grid(column=11,row=75)
b73_10.grid(column=12,row=75)
b73_11.grid(column=13,row=75)
b73_12.grid(column=14,row=75)
b73_13.grid(column=15,row=75)
b73_14.grid(column=16,row=75)
b73_15.grid(column=17,row=75)
b73_17.grid(column=19,row=75)
trig_74.grid(column=25,row=75)

b74_0.grid(column=2,row=76)
b74_1.grid(column=3,row=76)
b74_2.grid(column=4,row=76)
b74_3.grid(column=5,row=76)
b74_4.grid(column=6,row=76)
b74_5.grid(column=7,row=76)
b74_6.grid(column=8,row=76)
b74_7.grid(column=9,row=76)
b74_8.grid(column=10,row=76)
b74_9.grid(column=11,row=76)
b74_10.grid(column=12,row=76)
b74_11.grid(column=13,row=76)
b74_12.grid(column=14,row=76)
b74_13.grid(column=15,row=76)
b74_14.grid(column=16,row=76)
b74_15.grid(column=17,row=76)
b74_17.grid(column=19,row=76)
trig_75.grid(column=25,row=76)

b75_0.grid(column=2,row=77)
b75_1.grid(column=3,row=77)
b75_2.grid(column=4,row=77)
b75_3.grid(column=5,row=77)
b75_4.grid(column=6,row=77)
b75_5.grid(column=7,row=77)
b75_6.grid(column=8,row=77)
b75_7.grid(column=9,row=77)
b75_8.grid(column=10,row=77)
b75_9.grid(column=11,row=77)
b75_10.grid(column=12,row=77)
b75_11.grid(column=13,row=77)
b75_12.grid(column=14,row=77)
b75_13.grid(column=15,row=77)
b75_14.grid(column=16,row=77)
b75_15.grid(column=17,row=77)
b75_17.grid(column=19,row=77)
trig_76.grid(column=25,row=77)

# Group 20

# defining labels
nameb76_0 = ttk.Label(content, text="Beat 77", background=c1.get())
nameb77_0 = ttk.Label(content, text="Beat 78", background=c1.get())
nameb78_0 = ttk.Label(content, text="Beat 79", background=c1.get())
nameb79_0 = ttk.Label(content, text="Beat 80", background=c1.get())


# Defining number type
b76_0var = IntVar()
b76_1var = IntVar()
b76_2var = IntVar()
b76_3var = IntVar()
b76_4var = IntVar()
b76_5var = IntVar()
b76_6var = IntVar()
b76_7var = IntVar()
b76_8var = IntVar()
b76_9var = IntVar()
b76_10var = IntVar()
b76_11var = IntVar()
b76_12var = IntVar()
b76_13var = IntVar()
b76_14var = IntVar()
b76_15var = IntVar()
b76_17var = IntVar()
trig_77var = IntVar()

b77_0var = IntVar()
b77_1var = IntVar()
b77_2var = IntVar()
b77_3var = IntVar()
b77_4var = IntVar()
b77_5var = IntVar()
b77_6var = IntVar()
b77_7var = IntVar()
b77_8var = IntVar()
b77_9var = IntVar()
b77_10var = IntVar()
b77_11var = IntVar()
b77_12var = IntVar()
b77_13var = IntVar()
b77_14var = IntVar()
b77_15var = IntVar()
b77_17var = IntVar()
trig_78var = IntVar()

b78_0var = IntVar()
b78_1var = IntVar()
b78_2var = IntVar()
b78_3var = IntVar()
b78_4var = IntVar()
b78_5var = IntVar()
b78_6var = IntVar()
b78_7var = IntVar()
b78_8var = IntVar()
b78_9var = IntVar()
b78_10var = IntVar()
b78_11var = IntVar()
b78_12var = IntVar()
b78_13var = IntVar()
b78_14var = IntVar()
b78_15var = IntVar()
b78_17var = IntVar()
trig_79var = IntVar()

b79_0var = IntVar()
b79_1var = IntVar()
b79_2var = IntVar()
b79_3var = IntVar()
b79_4var = IntVar()
b79_5var = IntVar()
b79_6var = IntVar()
b79_7var = IntVar()
b79_8var = IntVar()
b79_9var = IntVar()
b79_10var = IntVar()
b79_11var = IntVar()
b79_12var = IntVar()
b79_13var = IntVar()
b79_14var = IntVar()
b79_15var = IntVar()
b79_17var = IntVar()
trig_80var = IntVar()

# Setting default button position
b76_0var.set(0)
b76_1var.set(0)
b76_2var.set(0)
b76_3var.set(0)
b76_4var.set(0)
b76_5var.set(0)
b76_6var.set(0)
b76_7var.set(0)
b76_8var.set(0)
b76_9var.set(0)
b76_10var.set(0)
b76_11var.set(0)
b76_12var.set(0)
b76_13var.set(0)
b76_14var.set(0)
b76_15var.set(0)
b76_17var.set(0)
trig_77var.set(0)

b77_0var.set(0)
b77_1var.set(0)
b77_2var.set(0)
b77_3var.set(0)
b77_4var.set(0)
b77_5var.set(0)
b77_6var.set(0)
b77_7var.set(0)
b77_8var.set(0)
b77_9var.set(0)
b77_10var.set(0)
b77_11var.set(0)
b77_12var.set(0)
b77_13var.set(0)
b77_14var.set(0)
b77_15var.set(0)
b77_17var.set(0)
trig_78var.set(0)

b78_0var.set(0)
b78_1var.set(0)
b78_2var.set(0)
b78_3var.set(0)
b78_4var.set(0)
b78_5var.set(0)
b78_6var.set(0)
b78_7var.set(0)
b78_8var.set(0)
b78_9var.set(0)
b78_10var.set(0)
b78_11var.set(0)
b78_12var.set(0)
b78_13var.set(0)
b78_14var.set(0)
b78_15var.set(0)
b78_17var.set(0)
trig_79var.set(0)

b79_0var.set(0)
b79_1var.set(0)
b79_2var.set(0)
b79_3var.set(0)
b79_4var.set(0)
b79_5var.set(0)
b79_6var.set(0)
b79_7var.set(0)
b79_8var.set(0)
b79_9var.set(0)
b79_10var.set(0)
b79_11var.set(0)
b79_12var.set(0)
b79_13var.set(0)
b79_14var.set(0)
b79_15var.set(0)
b79_17var.set(0)
trig_80var.set(0)

# Defining button
b76_0 = ttk.Checkbutton(content, variable=b76_0var, onvalue=1, offvalue=0)
b76_1 = ttk.Checkbutton(content, variable=b76_1var, onvalue=1, offvalue=0)
b76_2 = ttk.Checkbutton(content, variable=b76_2var, onvalue=1, offvalue=0)
b76_3 = ttk.Checkbutton(content, variable=b76_3var, onvalue=1, offvalue=0)
b76_4 = ttk.Checkbutton(content, variable=b76_4var, onvalue=1, offvalue=0)
b76_5 = ttk.Checkbutton(content, variable=b76_5var, onvalue=1, offvalue=0)
b76_6 = ttk.Checkbutton(content, variable=b76_6var, onvalue=1, offvalue=0)
b76_7 = ttk.Checkbutton(content, variable=b76_7var, onvalue=1, offvalue=0)
b76_8 = ttk.Checkbutton(content, variable=b76_8var, onvalue=1, offvalue=0)
b76_9 = ttk.Checkbutton(content, variable=b76_9var, onvalue=1, offvalue=0)
b76_10 = ttk.Checkbutton(content, variable=b76_10var, onvalue=1, offvalue=0)
b76_11 = ttk.Checkbutton(content, variable=b76_11var, onvalue=1, offvalue=0)
b76_12 = ttk.Checkbutton(content, variable=b76_12var, onvalue=1, offvalue=0)
b76_13 = ttk.Checkbutton(content, variable=b76_13var, onvalue=1, offvalue=0)
b76_14 = ttk.Checkbutton(content, variable=b76_14var, onvalue=1, offvalue=0)
b76_15 = ttk.Checkbutton(content, variable=b76_15var, onvalue=1, offvalue=0)
b76_17 = ttk.Checkbutton(content, text="HALT", variable=b76_17var, onvalue=1, offvalue=0)
trig_77 = ttk.Checkbutton(content, variable=trig_77var, onvalue=1, offvalue=0)

b77_0 = ttk.Checkbutton(content, variable=b77_0var, onvalue=1, offvalue=0)
b77_1 = ttk.Checkbutton(content, variable=b77_1var, onvalue=1, offvalue=0)
b77_2 = ttk.Checkbutton(content, variable=b77_2var, onvalue=1, offvalue=0)
b77_3 = ttk.Checkbutton(content, variable=b77_3var, onvalue=1, offvalue=0)
b77_4 = ttk.Checkbutton(content, variable=b77_4var, onvalue=1, offvalue=0)
b77_5 = ttk.Checkbutton(content, variable=b77_5var, onvalue=1, offvalue=0)
b77_6 = ttk.Checkbutton(content, variable=b77_6var, onvalue=1, offvalue=0)
b77_7 = ttk.Checkbutton(content, variable=b77_7var, onvalue=1, offvalue=0)
b77_8 = ttk.Checkbutton(content, variable=b77_8var, onvalue=1, offvalue=0)
b77_9 = ttk.Checkbutton(content, variable=b77_9var, onvalue=1, offvalue=0)
b77_10 = ttk.Checkbutton(content, variable=b77_10var, onvalue=1, offvalue=0)
b77_11 = ttk.Checkbutton(content, variable=b77_11var, onvalue=1, offvalue=0)
b77_12 = ttk.Checkbutton(content, variable=b77_12var, onvalue=1, offvalue=0)
b77_13 = ttk.Checkbutton(content, variable=b77_13var, onvalue=1, offvalue=0)
b77_14 = ttk.Checkbutton(content, variable=b77_14var, onvalue=1, offvalue=0)
b77_15 = ttk.Checkbutton(content, variable=b77_15var, onvalue=1, offvalue=0)
b77_17 = ttk.Checkbutton(content, text="HALT", variable=b77_17var, onvalue=1, offvalue=0)
trig_78 = ttk.Checkbutton(content, variable=trig_78var, onvalue=1, offvalue=0)

b78_0 = ttk.Checkbutton(content, variable=b78_0var, onvalue=1, offvalue=0)
b78_1 = ttk.Checkbutton(content, variable=b78_1var, onvalue=1, offvalue=0)
b78_2 = ttk.Checkbutton(content, variable=b78_2var, onvalue=1, offvalue=0)
b78_3 = ttk.Checkbutton(content, variable=b78_3var, onvalue=1, offvalue=0)
b78_4 = ttk.Checkbutton(content, variable=b78_4var, onvalue=1, offvalue=0)
b78_5 = ttk.Checkbutton(content, variable=b78_5var, onvalue=1, offvalue=0)
b78_6 = ttk.Checkbutton(content, variable=b78_6var, onvalue=1, offvalue=0)
b78_7 = ttk.Checkbutton(content, variable=b78_7var, onvalue=1, offvalue=0)
b78_8 = ttk.Checkbutton(content, variable=b78_8var, onvalue=1, offvalue=0)
b78_9 = ttk.Checkbutton(content, variable=b78_9var, onvalue=1, offvalue=0)
b78_10 = ttk.Checkbutton(content, variable=b78_10var, onvalue=1, offvalue=0)
b78_11 = ttk.Checkbutton(content, variable=b78_11var, onvalue=1, offvalue=0)
b78_12 = ttk.Checkbutton(content, variable=b78_12var, onvalue=1, offvalue=0)
b78_13 = ttk.Checkbutton(content, variable=b78_13var, onvalue=1, offvalue=0)
b78_14 = ttk.Checkbutton(content, variable=b78_14var, onvalue=1, offvalue=0)
b78_15 = ttk.Checkbutton(content, variable=b78_15var, onvalue=1, offvalue=0)
b78_17 = ttk.Checkbutton(content, text="HALT", variable=b78_17var, onvalue=1, offvalue=0)
trig_79 = ttk.Checkbutton(content, variable=trig_79var, onvalue=1, offvalue=0)

b79_0 = ttk.Checkbutton(content, variable=b79_0var, onvalue=1, offvalue=0)
b79_1 = ttk.Checkbutton(content, variable=b79_1var, onvalue=1, offvalue=0)
b79_2 = ttk.Checkbutton(content, variable=b79_2var, onvalue=1, offvalue=0)
b79_3 = ttk.Checkbutton(content, variable=b79_3var, onvalue=1, offvalue=0)
b79_4 = ttk.Checkbutton(content, variable=b79_4var, onvalue=1, offvalue=0)
b79_5 = ttk.Checkbutton(content, variable=b79_5var, onvalue=1, offvalue=0)
b79_6 = ttk.Checkbutton(content, variable=b79_6var, onvalue=1, offvalue=0)
b79_7 = ttk.Checkbutton(content, variable=b79_7var, onvalue=1, offvalue=0)
b79_8 = ttk.Checkbutton(content, variable=b79_8var, onvalue=1, offvalue=0)
b79_9 = ttk.Checkbutton(content, variable=b79_9var, onvalue=1, offvalue=0)
b79_10 = ttk.Checkbutton(content, variable=b79_10var, onvalue=1, offvalue=0)
b79_11 = ttk.Checkbutton(content, variable=b79_11var, onvalue=1, offvalue=0)
b79_12 = ttk.Checkbutton(content, variable=b79_12var, onvalue=1, offvalue=0)
b79_13 = ttk.Checkbutton(content, variable=b79_13var, onvalue=1, offvalue=0)
b79_14 = ttk.Checkbutton(content, variable=b79_14var, onvalue=1, offvalue=0)
b79_15 = ttk.Checkbutton(content, variable=b79_15var, onvalue=1, offvalue=0)
b79_17 = ttk.Checkbutton(content, text="HALT", variable=b79_17var, onvalue=1, offvalue=0)
trig_80 = ttk.Checkbutton(content, variable=trig_80var, onvalue=1, offvalue=0)

# Placing text beside each beat
nameb76_0.grid(column=1, row=78)
nameb77_0.grid(column=1, row=79)
nameb78_0.grid(column=1, row=80)
nameb79_0.grid(column=1, row=81)


# Placing buttons on grid
b76_0.grid(column=2,row=78)
b76_1.grid(column=3,row=78)
b76_2.grid(column=4,row=78)
b76_3.grid(column=5,row=78)
b76_4.grid(column=6,row=78)
b76_5.grid(column=7,row=78)
b76_6.grid(column=8,row=78)
b76_7.grid(column=9,row=78)
b76_8.grid(column=10,row=78)
b76_9.grid(column=11,row=78)
b76_10.grid(column=12,row=78)
b76_11.grid(column=13,row=78)
b76_12.grid(column=14,row=78)
b76_13.grid(column=15,row=78)
b76_14.grid(column=16,row=78)
b76_15.grid(column=17,row=78)
b76_17.grid(column=19,row=78)
trig_77.grid(column=25,row=78)

b77_0.grid(column=2,row=79)
b77_1.grid(column=3,row=79)
b77_2.grid(column=4,row=79)
b77_3.grid(column=5,row=79)
b77_4.grid(column=6,row=79)
b77_5.grid(column=7,row=79)
b77_6.grid(column=8,row=79)
b77_7.grid(column=9,row=79)
b77_8.grid(column=10,row=79)
b77_9.grid(column=11,row=79)
b77_10.grid(column=12,row=79)
b77_11.grid(column=13,row=79)
b77_12.grid(column=14,row=79)
b77_13.grid(column=15,row=79)
b77_14.grid(column=16,row=79)
b77_15.grid(column=17,row=79)
b77_17.grid(column=19,row=79)
trig_78.grid(column=25,row=79)

b78_0.grid(column=2,row=80)
b78_1.grid(column=3,row=80)
b78_2.grid(column=4,row=80)
b78_3.grid(column=5,row=80)
b78_4.grid(column=6,row=80)
b78_5.grid(column=7,row=80)
b78_6.grid(column=8,row=80)
b78_7.grid(column=9,row=80)
b78_8.grid(column=10,row=80)
b78_9.grid(column=11,row=80)
b78_10.grid(column=12,row=80)
b78_11.grid(column=13,row=80)
b78_12.grid(column=14,row=80)
b78_13.grid(column=15,row=80)
b78_14.grid(column=16,row=80)
b78_15.grid(column=17,row=80)
b78_17.grid(column=19,row=80)
trig_79.grid(column=25,row=80)

b79_0.grid(column=2,row=81)
b79_1.grid(column=3,row=81)
b79_2.grid(column=4,row=81)
b79_3.grid(column=5,row=81)
b79_4.grid(column=6,row=81)
b79_5.grid(column=7,row=81)
b79_6.grid(column=8,row=81)
b79_7.grid(column=9,row=81)
b79_8.grid(column=10,row=81)
b79_9.grid(column=11,row=81)
b79_10.grid(column=12,row=81)
b79_11.grid(column=13,row=81)
b79_12.grid(column=14,row=81)
b79_13.grid(column=15,row=81)
b79_14.grid(column=16,row=81)
b79_15.grid(column=17,row=81)
b79_17.grid(column=19,row=81)
trig_80.grid(column=25,row=81)

# Group 21

# defining labels
nameb80_0 = ttk.Label(content, text="Beat 81", background=c1.get())
nameb81_0 = ttk.Label(content, text="Beat 82", background=c1.get())
nameb82_0 = ttk.Label(content, text="Beat 83", background=c1.get())
nameb83_0 = ttk.Label(content, text="Beat 84", background=c1.get())


# Defining number type
b80_0var = IntVar()
b80_1var = IntVar()
b80_2var = IntVar()
b80_3var = IntVar()
b80_4var = IntVar()
b80_5var = IntVar()
b80_6var = IntVar()
b80_7var = IntVar()
b80_8var = IntVar()
b80_9var = IntVar()
b80_10var = IntVar()
b80_11var = IntVar()
b80_12var = IntVar()
b80_13var = IntVar()
b80_14var = IntVar()
b80_15var = IntVar()
b80_17var = IntVar()
trig_81var = IntVar()

b81_0var = IntVar()
b81_1var = IntVar()
b81_2var = IntVar()
b81_3var = IntVar()
b81_4var = IntVar()
b81_5var = IntVar()
b81_6var = IntVar()
b81_7var = IntVar()
b81_8var = IntVar()
b81_9var = IntVar()
b81_10var = IntVar()
b81_11var = IntVar()
b81_12var = IntVar()
b81_13var = IntVar()
b81_14var = IntVar()
b81_15var = IntVar()
b81_17var = IntVar()
trig_82var = IntVar()

b82_0var = IntVar()
b82_1var = IntVar()
b82_2var = IntVar()
b82_3var = IntVar()
b82_4var = IntVar()
b82_5var = IntVar()
b82_6var = IntVar()
b82_7var = IntVar()
b82_8var = IntVar()
b82_9var = IntVar()
b82_10var = IntVar()
b82_11var = IntVar()
b82_12var = IntVar()
b82_13var = IntVar()
b82_14var = IntVar()
b82_15var = IntVar()
b82_17var = IntVar()
trig_83var = IntVar()

b83_0var = IntVar()
b83_1var = IntVar()
b83_2var = IntVar()
b83_3var = IntVar()
b83_4var = IntVar()
b83_5var = IntVar()
b83_6var = IntVar()
b83_7var = IntVar()
b83_8var = IntVar()
b83_9var = IntVar()
b83_10var = IntVar()
b83_11var = IntVar()
b83_12var = IntVar()
b83_13var = IntVar()
b83_14var = IntVar()
b83_15var = IntVar()
b83_17var = IntVar()
trig_84var = IntVar()

# Setting default button position
b80_0var.set(0)
b80_1var.set(0)
b80_2var.set(0)
b80_3var.set(0)
b80_4var.set(0)
b80_5var.set(0)
b80_6var.set(0)
b80_7var.set(0)
b80_8var.set(0)
b80_9var.set(0)
b80_10var.set(0)
b80_11var.set(0)
b80_12var.set(0)
b80_13var.set(0)
b80_14var.set(0)
b80_15var.set(0)
b80_17var.set(0)
trig_81var.set(0)

b81_0var.set(0)
b81_1var.set(0)
b81_2var.set(0)
b81_3var.set(0)
b81_4var.set(0)
b81_5var.set(0)
b81_6var.set(0)
b81_7var.set(0)
b81_8var.set(0)
b81_9var.set(0)
b81_10var.set(0)
b81_11var.set(0)
b81_12var.set(0)
b81_13var.set(0)
b81_14var.set(0)
b81_15var.set(0)
b81_17var.set(0)
trig_82var.set(0)

b82_0var.set(0)
b82_1var.set(0)
b82_2var.set(0)
b82_3var.set(0)
b82_4var.set(0)
b82_5var.set(0)
b82_6var.set(0)
b82_7var.set(0)
b82_8var.set(0)
b82_9var.set(0)
b82_10var.set(0)
b82_11var.set(0)
b82_12var.set(0)
b82_13var.set(0)
b82_14var.set(0)
b82_15var.set(0)
b82_17var.set(0)
trig_83var.set(0)

b83_0var.set(0)
b83_1var.set(0)
b83_2var.set(0)
b83_3var.set(0)
b83_4var.set(0)
b83_5var.set(0)
b83_6var.set(0)
b83_7var.set(0)
b83_8var.set(0)
b83_9var.set(0)
b83_10var.set(0)
b83_11var.set(0)
b83_12var.set(0)
b83_13var.set(0)
b83_14var.set(0)
b83_15var.set(0)
b83_17var.set(0)
trig_84var.set(0)

# Defining button
b80_0 = ttk.Checkbutton(content, variable=b80_0var, onvalue=1, offvalue=0)
b80_1 = ttk.Checkbutton(content, variable=b80_1var, onvalue=1, offvalue=0)
b80_2 = ttk.Checkbutton(content, variable=b80_2var, onvalue=1, offvalue=0)
b80_3 = ttk.Checkbutton(content, variable=b80_3var, onvalue=1, offvalue=0)
b80_4 = ttk.Checkbutton(content, variable=b80_4var, onvalue=1, offvalue=0)
b80_5 = ttk.Checkbutton(content, variable=b80_5var, onvalue=1, offvalue=0)
b80_6 = ttk.Checkbutton(content, variable=b80_6var, onvalue=1, offvalue=0)
b80_7 = ttk.Checkbutton(content, variable=b80_7var, onvalue=1, offvalue=0)
b80_8 = ttk.Checkbutton(content, variable=b80_8var, onvalue=1, offvalue=0)
b80_9 = ttk.Checkbutton(content, variable=b80_9var, onvalue=1, offvalue=0)
b80_10 = ttk.Checkbutton(content, variable=b80_10var, onvalue=1, offvalue=0)
b80_11 = ttk.Checkbutton(content, variable=b80_11var, onvalue=1, offvalue=0)
b80_12 = ttk.Checkbutton(content, variable=b80_12var, onvalue=1, offvalue=0)
b80_13 = ttk.Checkbutton(content, variable=b80_13var, onvalue=1, offvalue=0)
b80_14 = ttk.Checkbutton(content, variable=b80_14var, onvalue=1, offvalue=0)
b80_15 = ttk.Checkbutton(content, variable=b80_15var, onvalue=1, offvalue=0)
b80_17 = ttk.Checkbutton(content, text="HALT", variable=b80_17var, onvalue=1, offvalue=0)
trig_81 = ttk.Checkbutton(content, variable=trig_81var, onvalue=1, offvalue=0)

b81_0 = ttk.Checkbutton(content, variable=b81_0var, onvalue=1, offvalue=0)
b81_1 = ttk.Checkbutton(content, variable=b81_1var, onvalue=1, offvalue=0)
b81_2 = ttk.Checkbutton(content, variable=b81_2var, onvalue=1, offvalue=0)
b81_3 = ttk.Checkbutton(content, variable=b81_3var, onvalue=1, offvalue=0)
b81_4 = ttk.Checkbutton(content, variable=b81_4var, onvalue=1, offvalue=0)
b81_5 = ttk.Checkbutton(content, variable=b81_5var, onvalue=1, offvalue=0)
b81_6 = ttk.Checkbutton(content, variable=b81_6var, onvalue=1, offvalue=0)
b81_7 = ttk.Checkbutton(content, variable=b81_7var, onvalue=1, offvalue=0)
b81_8 = ttk.Checkbutton(content, variable=b81_8var, onvalue=1, offvalue=0)
b81_9 = ttk.Checkbutton(content, variable=b81_9var, onvalue=1, offvalue=0)
b81_10 = ttk.Checkbutton(content, variable=b81_10var, onvalue=1, offvalue=0)
b81_11 = ttk.Checkbutton(content, variable=b81_11var, onvalue=1, offvalue=0)
b81_12 = ttk.Checkbutton(content, variable=b81_12var, onvalue=1, offvalue=0)
b81_13 = ttk.Checkbutton(content, variable=b81_13var, onvalue=1, offvalue=0)
b81_14 = ttk.Checkbutton(content, variable=b81_14var, onvalue=1, offvalue=0)
b81_15 = ttk.Checkbutton(content, variable=b81_15var, onvalue=1, offvalue=0)
b81_17 = ttk.Checkbutton(content, text="HALT", variable=b81_17var, onvalue=1, offvalue=0)
trig_82 = ttk.Checkbutton(content, variable=trig_82var, onvalue=1, offvalue=0)

b82_0 = ttk.Checkbutton(content, variable=b82_0var, onvalue=1, offvalue=0)
b82_1 = ttk.Checkbutton(content, variable=b82_1var, onvalue=1, offvalue=0)
b82_2 = ttk.Checkbutton(content, variable=b82_2var, onvalue=1, offvalue=0)
b82_3 = ttk.Checkbutton(content, variable=b82_3var, onvalue=1, offvalue=0)
b82_4 = ttk.Checkbutton(content, variable=b82_4var, onvalue=1, offvalue=0)
b82_5 = ttk.Checkbutton(content, variable=b82_5var, onvalue=1, offvalue=0)
b82_6 = ttk.Checkbutton(content, variable=b82_6var, onvalue=1, offvalue=0)
b82_7 = ttk.Checkbutton(content, variable=b82_7var, onvalue=1, offvalue=0)
b82_8 = ttk.Checkbutton(content, variable=b82_8var, onvalue=1, offvalue=0)
b82_9 = ttk.Checkbutton(content, variable=b82_9var, onvalue=1, offvalue=0)
b82_10 = ttk.Checkbutton(content, variable=b82_10var, onvalue=1, offvalue=0)
b82_11 = ttk.Checkbutton(content, variable=b82_11var, onvalue=1, offvalue=0)
b82_12 = ttk.Checkbutton(content, variable=b82_12var, onvalue=1, offvalue=0)
b82_13 = ttk.Checkbutton(content, variable=b82_13var, onvalue=1, offvalue=0)
b82_14 = ttk.Checkbutton(content, variable=b82_14var, onvalue=1, offvalue=0)
b82_15 = ttk.Checkbutton(content, variable=b82_15var, onvalue=1, offvalue=0)
b82_17 = ttk.Checkbutton(content, text="HALT", variable=b82_17var, onvalue=1, offvalue=0)
trig_83 = ttk.Checkbutton(content, variable=trig_83var, onvalue=1, offvalue=0)

b83_0 = ttk.Checkbutton(content, variable=b83_0var, onvalue=1, offvalue=0)
b83_1 = ttk.Checkbutton(content, variable=b83_1var, onvalue=1, offvalue=0)
b83_2 = ttk.Checkbutton(content, variable=b83_2var, onvalue=1, offvalue=0)
b83_3 = ttk.Checkbutton(content, variable=b83_3var, onvalue=1, offvalue=0)
b83_4 = ttk.Checkbutton(content, variable=b83_4var, onvalue=1, offvalue=0)
b83_5 = ttk.Checkbutton(content, variable=b83_5var, onvalue=1, offvalue=0)
b83_6 = ttk.Checkbutton(content, variable=b83_6var, onvalue=1, offvalue=0)
b83_7 = ttk.Checkbutton(content, variable=b83_7var, onvalue=1, offvalue=0)
b83_8 = ttk.Checkbutton(content, variable=b83_8var, onvalue=1, offvalue=0)
b83_9 = ttk.Checkbutton(content, variable=b83_9var, onvalue=1, offvalue=0)
b83_10 = ttk.Checkbutton(content, variable=b83_10var, onvalue=1, offvalue=0)
b83_11 = ttk.Checkbutton(content, variable=b83_11var, onvalue=1, offvalue=0)
b83_12 = ttk.Checkbutton(content, variable=b83_12var, onvalue=1, offvalue=0)
b83_13 = ttk.Checkbutton(content, variable=b83_13var, onvalue=1, offvalue=0)
b83_14 = ttk.Checkbutton(content, variable=b83_14var, onvalue=1, offvalue=0)
b83_15 = ttk.Checkbutton(content, variable=b83_15var, onvalue=1, offvalue=0)
b83_17 = ttk.Checkbutton(content, text="HALT", variable=b83_17var, onvalue=1, offvalue=0)
trig_84 = ttk.Checkbutton(content, variable=trig_84var, onvalue=1, offvalue=0)

# Placing text beside each beat
nameb80_0.grid(column=1, row=82)
nameb81_0.grid(column=1, row=83)
nameb82_0.grid(column=1, row=84)
nameb83_0.grid(column=1, row=85)

# Placing buttons on grid
b80_0.grid(column=2,row=82)
b80_1.grid(column=3,row=82)
b80_2.grid(column=4,row=82)
b80_3.grid(column=5,row=82)
b80_4.grid(column=6,row=82)
b80_5.grid(column=7,row=82)
b80_6.grid(column=8,row=82)
b80_7.grid(column=9,row=82)
b80_8.grid(column=10,row=82)
b80_9.grid(column=11,row=82)
b80_10.grid(column=12,row=82)
b80_11.grid(column=13,row=82)
b80_12.grid(column=14,row=82)
b80_13.grid(column=15,row=82)
b80_14.grid(column=16,row=82)
b80_15.grid(column=17,row=82)
b80_17.grid(column=19,row=82)
trig_81.grid(column=25,row=82)

b81_0.grid(column=2,row=83)
b81_1.grid(column=3,row=83)
b81_2.grid(column=4,row=83)
b81_3.grid(column=5,row=83)
b81_4.grid(column=6,row=83)
b81_5.grid(column=7,row=83)
b81_6.grid(column=8,row=83)
b81_7.grid(column=9,row=83)
b81_8.grid(column=10,row=83)
b81_9.grid(column=11,row=83)
b81_10.grid(column=12,row=83)
b81_11.grid(column=13,row=83)
b81_12.grid(column=14,row=83)
b81_13.grid(column=15,row=83)
b81_14.grid(column=16,row=83)
b81_15.grid(column=17,row=83)
b81_17.grid(column=19,row=83)
trig_82.grid(column=25,row=83)

b82_0.grid(column=2,row=84)
b82_1.grid(column=3,row=84)
b82_2.grid(column=4,row=84)
b82_3.grid(column=5,row=84)
b82_4.grid(column=6,row=84)
b82_5.grid(column=7,row=84)
b82_6.grid(column=8,row=84)
b82_7.grid(column=9,row=84)
b82_8.grid(column=10,row=84)
b82_9.grid(column=11,row=84)
b82_10.grid(column=12,row=84)
b82_11.grid(column=13,row=84)
b82_12.grid(column=14,row=84)
b82_13.grid(column=15,row=84)
b82_14.grid(column=16,row=84)
b82_15.grid(column=17,row=84)
b82_17.grid(column=19,row=84)
trig_83.grid(column=25,row=84)

b83_0.grid(column=2,row=85)
b83_1.grid(column=3,row=85)
b83_2.grid(column=4,row=85)
b83_3.grid(column=5,row=85)
b83_4.grid(column=6,row=85)
b83_5.grid(column=7,row=85)
b83_6.grid(column=8,row=85)
b83_7.grid(column=9,row=85)
b83_8.grid(column=10,row=85)
b83_9.grid(column=11,row=85)
b83_10.grid(column=12,row=85)
b83_11.grid(column=13,row=85)
b83_12.grid(column=14,row=85)
b83_13.grid(column=15,row=85)
b83_14.grid(column=16,row=85)
b83_15.grid(column=17,row=85)
b83_17.grid(column=19,row=85)
trig_84.grid(column=25,row=85)

# Group 22

# defining labels
nameb84_0 = ttk.Label(content, text="Beat 85", background=c1.get())
nameb85_0 = ttk.Label(content, text="Beat 86", background=c1.get())
nameb86_0 = ttk.Label(content, text="Beat 87", background=c1.get())
nameb87_0 = ttk.Label(content, text="Beat 88", background=c1.get())


# Defining number type
b84_0var = IntVar()
b84_1var = IntVar()
b84_2var = IntVar()
b84_3var = IntVar()
b84_4var = IntVar()
b84_5var = IntVar()
b84_6var = IntVar()
b84_7var = IntVar()
b84_8var = IntVar()
b84_9var = IntVar()
b84_10var = IntVar()
b84_11var = IntVar()
b84_12var = IntVar()
b84_13var = IntVar()
b84_14var = IntVar()
b84_15var = IntVar()
b84_17var = IntVar()
trig_85var = IntVar()

b85_0var = IntVar()
b85_1var = IntVar()
b85_2var = IntVar()
b85_3var = IntVar()
b85_4var = IntVar()
b85_5var = IntVar()
b85_6var = IntVar()
b85_7var = IntVar()
b85_8var = IntVar()
b85_9var = IntVar()
b85_10var = IntVar()
b85_11var = IntVar()
b85_12var = IntVar()
b85_13var = IntVar()
b85_14var = IntVar()
b85_15var = IntVar()
b85_17var = IntVar()
trig_86var = IntVar()

b86_0var = IntVar()
b86_1var = IntVar()
b86_2var = IntVar()
b86_3var = IntVar()
b86_4var = IntVar()
b86_5var = IntVar()
b86_6var = IntVar()
b86_7var = IntVar()
b86_8var = IntVar()
b86_9var = IntVar()
b86_10var = IntVar()
b86_11var = IntVar()
b86_12var = IntVar()
b86_13var = IntVar()
b86_14var = IntVar()
b86_15var = IntVar()
b86_17var = IntVar()
trig_87var = IntVar()

b87_0var = IntVar()
b87_1var = IntVar()
b87_2var = IntVar()
b87_3var = IntVar()
b87_4var = IntVar()
b87_5var = IntVar()
b87_6var = IntVar()
b87_7var = IntVar()
b87_8var = IntVar()
b87_9var = IntVar()
b87_10var = IntVar()
b87_11var = IntVar()
b87_12var = IntVar()
b87_13var = IntVar()
b87_14var = IntVar()
b87_15var = IntVar()
b87_17var = IntVar()
trig_88var = IntVar()

# Setting default button position
b84_0var.set(0)
b84_1var.set(0)
b84_2var.set(0)
b84_3var.set(0)
b84_4var.set(0)
b84_5var.set(0)
b84_6var.set(0)
b84_7var.set(0)
b84_8var.set(0)
b84_9var.set(0)
b84_10var.set(0)
b84_11var.set(0)
b84_12var.set(0)
b84_13var.set(0)
b84_14var.set(0)
b84_15var.set(0)
b84_17var.set(0)
trig_85var.set(0)

b85_0var.set(0)
b85_1var.set(0)
b85_2var.set(0)
b85_3var.set(0)
b85_4var.set(0)
b85_5var.set(0)
b85_6var.set(0)
b85_7var.set(0)
b85_8var.set(0)
b85_9var.set(0)
b85_10var.set(0)
b85_11var.set(0)
b85_12var.set(0)
b85_13var.set(0)
b85_14var.set(0)
b85_15var.set(0)
b85_17var.set(0)
trig_86var.set(0)

b86_0var.set(0)
b86_1var.set(0)
b86_2var.set(0)
b86_3var.set(0)
b86_4var.set(0)
b86_5var.set(0)
b86_6var.set(0)
b86_7var.set(0)
b86_8var.set(0)
b86_9var.set(0)
b86_10var.set(0)
b86_11var.set(0)
b86_12var.set(0)
b86_13var.set(0)
b86_14var.set(0)
b86_15var.set(0)
b86_17var.set(0)
trig_87var.set(0)

b87_0var.set(0)
b87_1var.set(0)
b87_2var.set(0)
b87_3var.set(0)
b87_4var.set(0)
b87_5var.set(0)
b87_6var.set(0)
b87_7var.set(0)
b87_8var.set(0)
b87_9var.set(0)
b87_10var.set(0)
b87_11var.set(0)
b87_12var.set(0)
b87_13var.set(0)
b87_14var.set(0)
b87_15var.set(0)
b87_17var.set(0)
trig_88var.set(0)

# Defining button
b84_0 = ttk.Checkbutton(content, variable=b84_0var, onvalue=1, offvalue=0)
b84_1 = ttk.Checkbutton(content, variable=b84_1var, onvalue=1, offvalue=0)
b84_2 = ttk.Checkbutton(content, variable=b84_2var, onvalue=1, offvalue=0)
b84_3 = ttk.Checkbutton(content, variable=b84_3var, onvalue=1, offvalue=0)
b84_4 = ttk.Checkbutton(content, variable=b84_4var, onvalue=1, offvalue=0)
b84_5 = ttk.Checkbutton(content, variable=b84_5var, onvalue=1, offvalue=0)
b84_6 = ttk.Checkbutton(content, variable=b84_6var, onvalue=1, offvalue=0)
b84_7 = ttk.Checkbutton(content, variable=b84_7var, onvalue=1, offvalue=0)
b84_8 = ttk.Checkbutton(content, variable=b84_8var, onvalue=1, offvalue=0)
b84_9 = ttk.Checkbutton(content, variable=b84_9var, onvalue=1, offvalue=0)
b84_10 = ttk.Checkbutton(content, variable=b84_10var, onvalue=1, offvalue=0)
b84_11 = ttk.Checkbutton(content, variable=b84_11var, onvalue=1, offvalue=0)
b84_12 = ttk.Checkbutton(content, variable=b84_12var, onvalue=1, offvalue=0)
b84_13 = ttk.Checkbutton(content, variable=b84_13var, onvalue=1, offvalue=0)
b84_14 = ttk.Checkbutton(content, variable=b84_14var, onvalue=1, offvalue=0)
b84_15 = ttk.Checkbutton(content, variable=b84_15var, onvalue=1, offvalue=0)
b84_17 = ttk.Checkbutton(content, text="HALT", variable=b84_17var, onvalue=1, offvalue=0)
trig_85 = ttk.Checkbutton(content, variable=trig_85var, onvalue=1, offvalue=0)

b85_0 = ttk.Checkbutton(content, variable=b85_0var, onvalue=1, offvalue=0)
b85_1 = ttk.Checkbutton(content, variable=b85_1var, onvalue=1, offvalue=0)
b85_2 = ttk.Checkbutton(content, variable=b85_2var, onvalue=1, offvalue=0)
b85_3 = ttk.Checkbutton(content, variable=b85_3var, onvalue=1, offvalue=0)
b85_4 = ttk.Checkbutton(content, variable=b85_4var, onvalue=1, offvalue=0)
b85_5 = ttk.Checkbutton(content, variable=b85_5var, onvalue=1, offvalue=0)
b85_6 = ttk.Checkbutton(content, variable=b85_6var, onvalue=1, offvalue=0)
b85_7 = ttk.Checkbutton(content, variable=b85_7var, onvalue=1, offvalue=0)
b85_8 = ttk.Checkbutton(content, variable=b85_8var, onvalue=1, offvalue=0)
b85_9 = ttk.Checkbutton(content, variable=b85_9var, onvalue=1, offvalue=0)
b85_10 = ttk.Checkbutton(content, variable=b85_10var, onvalue=1, offvalue=0)
b85_11 = ttk.Checkbutton(content, variable=b85_11var, onvalue=1, offvalue=0)
b85_12 = ttk.Checkbutton(content, variable=b85_12var, onvalue=1, offvalue=0)
b85_13 = ttk.Checkbutton(content, variable=b85_13var, onvalue=1, offvalue=0)
b85_14 = ttk.Checkbutton(content, variable=b85_14var, onvalue=1, offvalue=0)
b85_15 = ttk.Checkbutton(content, variable=b85_15var, onvalue=1, offvalue=0)
b85_17 = ttk.Checkbutton(content, text="HALT", variable=b85_17var, onvalue=1, offvalue=0)
trig_86 = ttk.Checkbutton(content, variable=trig_86var, onvalue=1, offvalue=0)

b86_0 = ttk.Checkbutton(content, variable=b86_0var, onvalue=1, offvalue=0)
b86_1 = ttk.Checkbutton(content, variable=b86_1var, onvalue=1, offvalue=0)
b86_2 = ttk.Checkbutton(content, variable=b86_2var, onvalue=1, offvalue=0)
b86_3 = ttk.Checkbutton(content, variable=b86_3var, onvalue=1, offvalue=0)
b86_4 = ttk.Checkbutton(content, variable=b86_4var, onvalue=1, offvalue=0)
b86_5 = ttk.Checkbutton(content, variable=b86_5var, onvalue=1, offvalue=0)
b86_6 = ttk.Checkbutton(content, variable=b86_6var, onvalue=1, offvalue=0)
b86_7 = ttk.Checkbutton(content, variable=b86_7var, onvalue=1, offvalue=0)
b86_8 = ttk.Checkbutton(content, variable=b86_8var, onvalue=1, offvalue=0)
b86_9 = ttk.Checkbutton(content, variable=b86_9var, onvalue=1, offvalue=0)
b86_10 = ttk.Checkbutton(content, variable=b86_10var, onvalue=1, offvalue=0)
b86_11 = ttk.Checkbutton(content, variable=b86_11var, onvalue=1, offvalue=0)
b86_12 = ttk.Checkbutton(content, variable=b86_12var, onvalue=1, offvalue=0)
b86_13 = ttk.Checkbutton(content, variable=b86_13var, onvalue=1, offvalue=0)
b86_14 = ttk.Checkbutton(content, variable=b86_14var, onvalue=1, offvalue=0)
b86_15 = ttk.Checkbutton(content, variable=b86_15var, onvalue=1, offvalue=0)
b86_17 = ttk.Checkbutton(content, text="HALT", variable=b86_17var, onvalue=1, offvalue=0)
trig_87 = ttk.Checkbutton(content, variable=trig_87var, onvalue=1, offvalue=0)

b87_0 = ttk.Checkbutton(content, variable=b87_0var, onvalue=1, offvalue=0)
b87_1 = ttk.Checkbutton(content, variable=b87_1var, onvalue=1, offvalue=0)
b87_2 = ttk.Checkbutton(content, variable=b87_2var, onvalue=1, offvalue=0)
b87_3 = ttk.Checkbutton(content, variable=b87_3var, onvalue=1, offvalue=0)
b87_4 = ttk.Checkbutton(content, variable=b87_4var, onvalue=1, offvalue=0)
b87_5 = ttk.Checkbutton(content, variable=b87_5var, onvalue=1, offvalue=0)
b87_6 = ttk.Checkbutton(content, variable=b87_6var, onvalue=1, offvalue=0)
b87_7 = ttk.Checkbutton(content, variable=b87_7var, onvalue=1, offvalue=0)
b87_8 = ttk.Checkbutton(content, variable=b87_8var, onvalue=1, offvalue=0)
b87_9 = ttk.Checkbutton(content, variable=b87_9var, onvalue=1, offvalue=0)
b87_10 = ttk.Checkbutton(content, variable=b87_10var, onvalue=1, offvalue=0)
b87_11 = ttk.Checkbutton(content, variable=b87_11var, onvalue=1, offvalue=0)
b87_12 = ttk.Checkbutton(content, variable=b87_12var, onvalue=1, offvalue=0)
b87_13 = ttk.Checkbutton(content, variable=b87_13var, onvalue=1, offvalue=0)
b87_14 = ttk.Checkbutton(content, variable=b87_14var, onvalue=1, offvalue=0)
b87_15 = ttk.Checkbutton(content, variable=b87_15var, onvalue=1, offvalue=0)
b87_17 = ttk.Checkbutton(content, text="HALT", variable=b87_17var, onvalue=1, offvalue=0)
trig_88 = ttk.Checkbutton(content, variable=trig_88var, onvalue=1, offvalue=0)

# Placing text beside each beat
nameb84_0.grid(column=1, row=86)
nameb85_0.grid(column=1, row=87)
nameb86_0.grid(column=1, row=88)
nameb87_0.grid(column=1, row=89)

# Placing buttons on grid
b84_0.grid(column=2,row=86)
b84_1.grid(column=3,row=86)
b84_2.grid(column=4,row=86)
b84_3.grid(column=5,row=86)
b84_4.grid(column=6,row=86)
b84_5.grid(column=7,row=86)
b84_6.grid(column=8,row=86)
b84_7.grid(column=9,row=86)
b84_8.grid(column=10,row=86)
b84_9.grid(column=11,row=86)
b84_10.grid(column=12,row=86)
b84_11.grid(column=13,row=86)
b84_12.grid(column=14,row=86)
b84_13.grid(column=15,row=86)
b84_14.grid(column=16,row=86)
b84_15.grid(column=17,row=86)
b84_17.grid(column=19,row=86)
trig_85.grid(column=25,row=86)

b85_0.grid(column=2,row=87)
b85_1.grid(column=3,row=87)
b85_2.grid(column=4,row=87)
b85_3.grid(column=5,row=87)
b85_4.grid(column=6,row=87)
b85_5.grid(column=7,row=87)
b85_6.grid(column=8,row=87)
b85_7.grid(column=9,row=87)
b85_8.grid(column=10,row=87)
b85_9.grid(column=11,row=87)
b85_10.grid(column=12,row=87)
b85_11.grid(column=13,row=87)
b85_12.grid(column=14,row=87)
b85_13.grid(column=15,row=87)
b85_14.grid(column=16,row=87)
b85_15.grid(column=17,row=87)
b85_17.grid(column=19,row=87)
trig_86.grid(column=25,row=87)

b86_0.grid(column=2,row=88)
b86_1.grid(column=3,row=88)
b86_2.grid(column=4,row=88)
b86_3.grid(column=5,row=88)
b86_4.grid(column=6,row=88)
b86_5.grid(column=7,row=88)
b86_6.grid(column=8,row=88)
b86_7.grid(column=9,row=88)
b86_8.grid(column=10,row=88)
b86_9.grid(column=11,row=88)
b86_10.grid(column=12,row=88)
b86_11.grid(column=13,row=88)
b86_12.grid(column=14,row=88)
b86_13.grid(column=15,row=88)
b86_14.grid(column=16,row=88)
b86_15.grid(column=17,row=88)
b86_17.grid(column=19,row=88)
trig_87.grid(column=25,row=88)

b87_0.grid(column=2,row=89)
b87_1.grid(column=3,row=89)
b87_2.grid(column=4,row=89)
b87_3.grid(column=5,row=89)
b87_4.grid(column=6,row=89)
b87_5.grid(column=7,row=89)
b87_6.grid(column=8,row=89)
b87_7.grid(column=9,row=89)
b87_8.grid(column=10,row=89)
b87_9.grid(column=11,row=89)
b87_10.grid(column=12,row=89)
b87_11.grid(column=13,row=89)
b87_12.grid(column=14,row=89)
b87_13.grid(column=15,row=89)
b87_14.grid(column=16,row=89)
b87_15.grid(column=17,row=89)
b87_17.grid(column=19,row=89)
trig_88.grid(column=25,row=89)

# Group 23

# defining labels
nameb88_0 = ttk.Label(content, text="Beat 89", background=c1.get())
nameb89_0 = ttk.Label(content, text="Beat 90", background=c1.get())
nameb90_0 = ttk.Label(content, text="Beat 91", background=c1.get())
nameb91_0 = ttk.Label(content, text="Beat 92", background=c1.get())


# Defining number type
b88_0var = IntVar()
b88_1var = IntVar()
b88_2var = IntVar()
b88_3var = IntVar()
b88_4var = IntVar()
b88_5var = IntVar()
b88_6var = IntVar()
b88_7var = IntVar()
b88_8var = IntVar()
b88_9var = IntVar()
b88_10var = IntVar()
b88_11var = IntVar()
b88_12var = IntVar()
b88_13var = IntVar()
b88_14var = IntVar()
b88_15var = IntVar()
b88_17var = IntVar()
trig_89var = IntVar()

b89_0var = IntVar()
b89_1var = IntVar()
b89_2var = IntVar()
b89_3var = IntVar()
b89_4var = IntVar()
b89_5var = IntVar()
b89_6var = IntVar()
b89_7var = IntVar()
b89_8var = IntVar()
b89_9var = IntVar()
b89_10var = IntVar()
b89_11var = IntVar()
b89_12var = IntVar()
b89_13var = IntVar()
b89_14var = IntVar()
b89_15var = IntVar()
b89_17var = IntVar()
trig_90var = IntVar()

b90_0var = IntVar()
b90_1var = IntVar()
b90_2var = IntVar()
b90_3var = IntVar()
b90_4var = IntVar()
b90_5var = IntVar()
b90_6var = IntVar()
b90_7var = IntVar()
b90_8var = IntVar()
b90_9var = IntVar()
b90_10var = IntVar()
b90_11var = IntVar()
b90_12var = IntVar()
b90_13var = IntVar()
b90_14var = IntVar()
b90_15var = IntVar()
b90_17var = IntVar()
trig_91var = IntVar()

b91_0var = IntVar()
b91_1var = IntVar()
b91_2var = IntVar()
b91_3var = IntVar()
b91_4var = IntVar()
b91_5var = IntVar()
b91_6var = IntVar()
b91_7var = IntVar()
b91_8var = IntVar()
b91_9var = IntVar()
b91_10var = IntVar()
b91_11var = IntVar()
b91_12var = IntVar()
b91_13var = IntVar()
b91_14var = IntVar()
b91_15var = IntVar()
b91_17var = IntVar()
trig_92var = IntVar()

# Setting default button position
b88_0var.set(0)
b88_1var.set(0)
b88_2var.set(0)
b88_3var.set(0)
b88_4var.set(0)
b88_5var.set(0)
b88_6var.set(0)
b88_7var.set(0)
b88_8var.set(0)
b88_9var.set(0)
b88_10var.set(0)
b88_11var.set(0)
b88_12var.set(0)
b88_13var.set(0)
b88_14var.set(0)
b88_15var.set(0)
b88_17var.set(0)
trig_89var.set(0)

b89_0var.set(0)
b89_1var.set(0)
b89_2var.set(0)
b89_3var.set(0)
b89_4var.set(0)
b89_5var.set(0)
b89_6var.set(0)
b89_7var.set(0)
b89_8var.set(0)
b89_9var.set(0)
b89_10var.set(0)
b89_11var.set(0)
b89_12var.set(0)
b89_13var.set(0)
b89_14var.set(0)
b89_15var.set(0)
b89_17var.set(0)
trig_90var.set(0)

b90_0var.set(0)
b90_1var.set(0)
b90_2var.set(0)
b90_3var.set(0)
b90_4var.set(0)
b90_5var.set(0)
b90_6var.set(0)
b90_7var.set(0)
b90_8var.set(0)
b90_9var.set(0)
b90_10var.set(0)
b90_11var.set(0)
b90_12var.set(0)
b90_13var.set(0)
b90_14var.set(0)
b90_15var.set(0)
b90_17var.set(0)
trig_91var.set(0)

b91_0var.set(0)
b91_1var.set(0)
b91_2var.set(0)
b91_3var.set(0)
b91_4var.set(0)
b91_5var.set(0)
b91_6var.set(0)
b91_7var.set(0)
b91_8var.set(0)
b91_9var.set(0)
b91_10var.set(0)
b91_11var.set(0)
b91_12var.set(0)
b91_13var.set(0)
b91_14var.set(0)
b91_15var.set(0)
b91_17var.set(0)
trig_92var.set(0)

# Defining button
b88_0 = ttk.Checkbutton(content, variable=b88_0var, onvalue=1, offvalue=0)
b88_1 = ttk.Checkbutton(content, variable=b88_1var, onvalue=1, offvalue=0)
b88_2 = ttk.Checkbutton(content, variable=b88_2var, onvalue=1, offvalue=0)
b88_3 = ttk.Checkbutton(content, variable=b88_3var, onvalue=1, offvalue=0)
b88_4 = ttk.Checkbutton(content, variable=b88_4var, onvalue=1, offvalue=0)
b88_5 = ttk.Checkbutton(content, variable=b88_5var, onvalue=1, offvalue=0)
b88_6 = ttk.Checkbutton(content, variable=b88_6var, onvalue=1, offvalue=0)
b88_7 = ttk.Checkbutton(content, variable=b88_7var, onvalue=1, offvalue=0)
b88_8 = ttk.Checkbutton(content, variable=b88_8var, onvalue=1, offvalue=0)
b88_9 = ttk.Checkbutton(content, variable=b88_9var, onvalue=1, offvalue=0)
b88_10 = ttk.Checkbutton(content, variable=b88_10var, onvalue=1, offvalue=0)
b88_11 = ttk.Checkbutton(content, variable=b88_11var, onvalue=1, offvalue=0)
b88_12 = ttk.Checkbutton(content, variable=b88_12var, onvalue=1, offvalue=0)
b88_13 = ttk.Checkbutton(content, variable=b88_13var, onvalue=1, offvalue=0)
b88_14 = ttk.Checkbutton(content, variable=b88_14var, onvalue=1, offvalue=0)
b88_15 = ttk.Checkbutton(content, variable=b88_15var, onvalue=1, offvalue=0)
b88_17 = ttk.Checkbutton(content, text="HALT", variable=b88_17var, onvalue=1, offvalue=0)
trig_89 = ttk.Checkbutton(content, variable=trig_89var, onvalue=1, offvalue=0)

b89_0 = ttk.Checkbutton(content, variable=b89_0var, onvalue=1, offvalue=0)
b89_1 = ttk.Checkbutton(content, variable=b89_1var, onvalue=1, offvalue=0)
b89_2 = ttk.Checkbutton(content, variable=b89_2var, onvalue=1, offvalue=0)
b89_3 = ttk.Checkbutton(content, variable=b89_3var, onvalue=1, offvalue=0)
b89_4 = ttk.Checkbutton(content, variable=b89_4var, onvalue=1, offvalue=0)
b89_5 = ttk.Checkbutton(content, variable=b89_5var, onvalue=1, offvalue=0)
b89_6 = ttk.Checkbutton(content, variable=b89_6var, onvalue=1, offvalue=0)
b89_7 = ttk.Checkbutton(content, variable=b89_7var, onvalue=1, offvalue=0)
b89_8 = ttk.Checkbutton(content, variable=b89_8var, onvalue=1, offvalue=0)
b89_9 = ttk.Checkbutton(content, variable=b89_9var, onvalue=1, offvalue=0)
b89_10 = ttk.Checkbutton(content, variable=b89_10var, onvalue=1, offvalue=0)
b89_11 = ttk.Checkbutton(content, variable=b89_11var, onvalue=1, offvalue=0)
b89_12 = ttk.Checkbutton(content, variable=b89_12var, onvalue=1, offvalue=0)
b89_13 = ttk.Checkbutton(content, variable=b89_13var, onvalue=1, offvalue=0)
b89_14 = ttk.Checkbutton(content, variable=b89_14var, onvalue=1, offvalue=0)
b89_15 = ttk.Checkbutton(content, variable=b89_15var, onvalue=1, offvalue=0)
b89_17 = ttk.Checkbutton(content, text="HALT", variable=b89_17var, onvalue=1, offvalue=0)
trig_90 = ttk.Checkbutton(content, variable=trig_90var, onvalue=1, offvalue=0)

b90_0 = ttk.Checkbutton(content, variable=b90_0var, onvalue=1, offvalue=0)
b90_1 = ttk.Checkbutton(content, variable=b90_1var, onvalue=1, offvalue=0)
b90_2 = ttk.Checkbutton(content, variable=b90_2var, onvalue=1, offvalue=0)
b90_3 = ttk.Checkbutton(content, variable=b90_3var, onvalue=1, offvalue=0)
b90_4 = ttk.Checkbutton(content, variable=b90_4var, onvalue=1, offvalue=0)
b90_5 = ttk.Checkbutton(content, variable=b90_5var, onvalue=1, offvalue=0)
b90_6 = ttk.Checkbutton(content, variable=b90_6var, onvalue=1, offvalue=0)
b90_7 = ttk.Checkbutton(content, variable=b90_7var, onvalue=1, offvalue=0)
b90_8 = ttk.Checkbutton(content, variable=b90_8var, onvalue=1, offvalue=0)
b90_9 = ttk.Checkbutton(content, variable=b90_9var, onvalue=1, offvalue=0)
b90_10 = ttk.Checkbutton(content, variable=b90_10var, onvalue=1, offvalue=0)
b90_11 = ttk.Checkbutton(content, variable=b90_11var, onvalue=1, offvalue=0)
b90_12 = ttk.Checkbutton(content, variable=b90_12var, onvalue=1, offvalue=0)
b90_13 = ttk.Checkbutton(content, variable=b90_13var, onvalue=1, offvalue=0)
b90_14 = ttk.Checkbutton(content, variable=b90_14var, onvalue=1, offvalue=0)
b90_15 = ttk.Checkbutton(content, variable=b90_15var, onvalue=1, offvalue=0)
b90_17 = ttk.Checkbutton(content, text="HALT", variable=b90_17var, onvalue=1, offvalue=0)
trig_91 = ttk.Checkbutton(content, variable=trig_91var, onvalue=1, offvalue=0)

b91_0 = ttk.Checkbutton(content, variable=b91_0var, onvalue=1, offvalue=0)
b91_1 = ttk.Checkbutton(content, variable=b91_1var, onvalue=1, offvalue=0)
b91_2 = ttk.Checkbutton(content, variable=b91_2var, onvalue=1, offvalue=0)
b91_3 = ttk.Checkbutton(content, variable=b91_3var, onvalue=1, offvalue=0)
b91_4 = ttk.Checkbutton(content, variable=b91_4var, onvalue=1, offvalue=0)
b91_5 = ttk.Checkbutton(content, variable=b91_5var, onvalue=1, offvalue=0)
b91_6 = ttk.Checkbutton(content, variable=b91_6var, onvalue=1, offvalue=0)
b91_7 = ttk.Checkbutton(content, variable=b91_7var, onvalue=1, offvalue=0)
b91_8 = ttk.Checkbutton(content, variable=b91_8var, onvalue=1, offvalue=0)
b91_9 = ttk.Checkbutton(content, variable=b91_9var, onvalue=1, offvalue=0)
b91_10 = ttk.Checkbutton(content, variable=b91_10var, onvalue=1, offvalue=0)
b91_11 = ttk.Checkbutton(content, variable=b91_11var, onvalue=1, offvalue=0)
b91_12 = ttk.Checkbutton(content, variable=b91_12var, onvalue=1, offvalue=0)
b91_13 = ttk.Checkbutton(content, variable=b91_13var, onvalue=1, offvalue=0)
b91_14 = ttk.Checkbutton(content, variable=b91_14var, onvalue=1, offvalue=0)
b91_15 = ttk.Checkbutton(content, variable=b91_15var, onvalue=1, offvalue=0)
b91_17 = ttk.Checkbutton(content, text="HALT", variable=b91_17var, onvalue=1, offvalue=0)
trig_92 = ttk.Checkbutton(content, variable=trig_92var, onvalue=1, offvalue=0)

# Placing text beside each beat
nameb88_0.grid(column=1, row=90)
nameb89_0.grid(column=1, row=91)
nameb90_0.grid(column=1, row=92)
nameb91_0.grid(column=1, row=93)

# Placing buttons on grid
b88_0.grid(column=2,row=90)
b88_1.grid(column=3,row=90)
b88_2.grid(column=4,row=90)
b88_3.grid(column=5,row=90)
b88_4.grid(column=6,row=90)
b88_5.grid(column=7,row=90)
b88_6.grid(column=8,row=90)
b88_7.grid(column=9,row=90)
b88_8.grid(column=10,row=90)
b88_9.grid(column=11,row=90)
b88_10.grid(column=12,row=90)
b88_11.grid(column=13,row=90)
b88_12.grid(column=14,row=90)
b88_13.grid(column=15,row=90)
b88_14.grid(column=16,row=90)
b88_15.grid(column=17,row=90)
b88_17.grid(column=19,row=90)
trig_89.grid(column=25,row=90)

b89_0.grid(column=2,row=91)
b89_1.grid(column=3,row=91)
b89_2.grid(column=4,row=91)
b89_3.grid(column=5,row=91)
b89_4.grid(column=6,row=91)
b89_5.grid(column=7,row=91)
b89_6.grid(column=8,row=91)
b89_7.grid(column=9,row=91)
b89_8.grid(column=10,row=91)
b89_9.grid(column=11,row=91)
b89_10.grid(column=12,row=91)
b89_11.grid(column=13,row=91)
b89_12.grid(column=14,row=91)
b89_13.grid(column=15,row=91)
b89_14.grid(column=16,row=91)
b89_15.grid(column=17,row=91)
b89_17.grid(column=19,row=91)
trig_90.grid(column=25,row=91)

b90_0.grid(column=2,row=92)
b90_1.grid(column=3,row=92)
b90_2.grid(column=4,row=92)
b90_3.grid(column=5,row=92)
b90_4.grid(column=6,row=92)
b90_5.grid(column=7,row=92)
b90_6.grid(column=8,row=92)
b90_7.grid(column=9,row=92)
b90_8.grid(column=10,row=92)
b90_9.grid(column=11,row=92)
b90_10.grid(column=12,row=92)
b90_11.grid(column=13,row=92)
b90_12.grid(column=14,row=92)
b90_13.grid(column=15,row=92)
b90_14.grid(column=16,row=92)
b90_15.grid(column=17,row=92)
b90_17.grid(column=19,row=92)
trig_91.grid(column=25,row=92)

b91_0.grid(column=2,row=93)
b91_1.grid(column=3,row=93)
b91_2.grid(column=4,row=93)
b91_3.grid(column=5,row=93)
b91_4.grid(column=6,row=93)
b91_5.grid(column=7,row=93)
b91_6.grid(column=8,row=93)
b91_7.grid(column=9,row=93)
b91_8.grid(column=10,row=93)
b91_9.grid(column=11,row=93)
b91_10.grid(column=12,row=93)
b91_11.grid(column=13,row=93)
b91_12.grid(column=14,row=93)
b91_13.grid(column=15,row=93)
b91_14.grid(column=16,row=93)
b91_15.grid(column=17,row=93)
b91_17.grid(column=19,row=93)
trig_92.grid(column=25,row=93)

# Group 24

# defining labels
nameb92_0 = ttk.Label(content, text="Beat 93", background=c1.get())
nameb93_0 = ttk.Label(content, text="Beat 94", background=c1.get())
nameb94_0 = ttk.Label(content, text="Beat 95", background=c1.get())
nameb95_0 = ttk.Label(content, text="Beat 96", background=c1.get())


# Defining number type
b92_0var = IntVar()
b92_1var = IntVar()
b92_2var = IntVar()
b92_3var = IntVar()
b92_4var = IntVar()
b92_5var = IntVar()
b92_6var = IntVar()
b92_7var = IntVar()
b92_8var = IntVar()
b92_9var = IntVar()
b92_10var = IntVar()
b92_11var = IntVar()
b92_12var = IntVar()
b92_13var = IntVar()
b92_14var = IntVar()
b92_15var = IntVar()
b92_17var = IntVar()
trig_93var = IntVar()

b93_0var = IntVar()
b93_1var = IntVar()
b93_2var = IntVar()
b93_3var = IntVar()
b93_4var = IntVar()
b93_5var = IntVar()
b93_6var = IntVar()
b93_7var = IntVar()
b93_8var = IntVar()
b93_9var = IntVar()
b93_10var = IntVar()
b93_11var = IntVar()
b93_12var = IntVar()
b93_13var = IntVar()
b93_14var = IntVar()
b93_15var = IntVar()
b93_17var = IntVar()
trig_94var = IntVar()

b94_0var = IntVar()
b94_1var = IntVar()
b94_2var = IntVar()
b94_3var = IntVar()
b94_4var = IntVar()
b94_5var = IntVar()
b94_6var = IntVar()
b94_7var = IntVar()
b94_8var = IntVar()
b94_9var = IntVar()
b94_10var = IntVar()
b94_11var = IntVar()
b94_12var = IntVar()
b94_13var = IntVar()
b94_14var = IntVar()
b94_15var = IntVar()
b94_17var = IntVar()
trig_95var = IntVar()

b95_0var = IntVar()
b95_1var = IntVar()
b95_2var = IntVar()
b95_3var = IntVar()
b95_4var = IntVar()
b95_5var = IntVar()
b95_6var = IntVar()
b95_7var = IntVar()
b95_8var = IntVar()
b95_9var = IntVar()
b95_10var = IntVar()
b95_11var = IntVar()
b95_12var = IntVar()
b95_13var = IntVar()
b95_14var = IntVar()
b95_15var = IntVar()
b95_17var = IntVar()
trig_96var = IntVar()

# Setting default button position
b92_0var.set(0)
b92_1var.set(0)
b92_2var.set(0)
b92_3var.set(0)
b92_4var.set(0)
b92_5var.set(0)
b92_6var.set(0)
b92_7var.set(0)
b92_8var.set(0)
b92_9var.set(0)
b92_10var.set(0)
b92_11var.set(0)
b92_12var.set(0)
b92_13var.set(0)
b92_14var.set(0)
b92_15var.set(0)
b92_17var.set(0)
trig_93var.set(0)

b93_0var.set(0)
b93_1var.set(0)
b93_2var.set(0)
b93_3var.set(0)
b93_4var.set(0)
b93_5var.set(0)
b93_6var.set(0)
b93_7var.set(0)
b93_8var.set(0)
b93_9var.set(0)
b93_10var.set(0)
b93_11var.set(0)
b93_12var.set(0)
b93_13var.set(0)
b93_14var.set(0)
b93_15var.set(0)
b93_17var.set(0)
trig_94var.set(0)

b94_0var.set(0)
b94_1var.set(0)
b94_2var.set(0)
b94_3var.set(0)
b94_4var.set(0)
b94_5var.set(0)
b94_6var.set(0)
b94_7var.set(0)
b94_8var.set(0)
b94_9var.set(0)
b94_10var.set(0)
b94_11var.set(0)
b94_12var.set(0)
b94_13var.set(0)
b94_14var.set(0)
b94_15var.set(0)
b94_17var.set(0)
trig_95var.set(0)

b95_0var.set(0)
b95_1var.set(0)
b95_2var.set(0)
b95_3var.set(0)
b95_4var.set(0)
b95_5var.set(0)
b95_6var.set(0)
b95_7var.set(0)
b95_8var.set(0)
b95_9var.set(0)
b95_10var.set(0)
b95_11var.set(0)
b95_12var.set(0)
b95_13var.set(0)
b95_14var.set(0)
b95_15var.set(0)
b95_17var.set(0)
trig_96var.set(0)

# Defining button
b92_0 = ttk.Checkbutton(content, variable=b92_0var, onvalue=1, offvalue=0)
b92_1 = ttk.Checkbutton(content, variable=b92_1var, onvalue=1, offvalue=0)
b92_2 = ttk.Checkbutton(content, variable=b92_2var, onvalue=1, offvalue=0)
b92_3 = ttk.Checkbutton(content, variable=b92_3var, onvalue=1, offvalue=0)
b92_4 = ttk.Checkbutton(content, variable=b92_4var, onvalue=1, offvalue=0)
b92_5 = ttk.Checkbutton(content, variable=b92_5var, onvalue=1, offvalue=0)
b92_6 = ttk.Checkbutton(content, variable=b92_6var, onvalue=1, offvalue=0)
b92_7 = ttk.Checkbutton(content, variable=b92_7var, onvalue=1, offvalue=0)
b92_8 = ttk.Checkbutton(content, variable=b92_8var, onvalue=1, offvalue=0)
b92_9 = ttk.Checkbutton(content, variable=b92_9var, onvalue=1, offvalue=0)
b92_10 = ttk.Checkbutton(content, variable=b92_10var, onvalue=1, offvalue=0)
b92_11 = ttk.Checkbutton(content, variable=b92_11var, onvalue=1, offvalue=0)
b92_12 = ttk.Checkbutton(content, variable=b92_12var, onvalue=1, offvalue=0)
b92_13 = ttk.Checkbutton(content, variable=b92_13var, onvalue=1, offvalue=0)
b92_14 = ttk.Checkbutton(content, variable=b92_14var, onvalue=1, offvalue=0)
b92_15 = ttk.Checkbutton(content, variable=b92_15var, onvalue=1, offvalue=0)
b92_17 = ttk.Checkbutton(content, text="HALT", variable=b92_17var, onvalue=1, offvalue=0)
trig_93 = ttk.Checkbutton(content, variable=trig_93var, onvalue=1, offvalue=0)

b93_0 = ttk.Checkbutton(content, variable=b93_0var, onvalue=1, offvalue=0)
b93_1 = ttk.Checkbutton(content, variable=b93_1var, onvalue=1, offvalue=0)
b93_2 = ttk.Checkbutton(content, variable=b93_2var, onvalue=1, offvalue=0)
b93_3 = ttk.Checkbutton(content, variable=b93_3var, onvalue=1, offvalue=0)
b93_4 = ttk.Checkbutton(content, variable=b93_4var, onvalue=1, offvalue=0)
b93_5 = ttk.Checkbutton(content, variable=b93_5var, onvalue=1, offvalue=0)
b93_6 = ttk.Checkbutton(content, variable=b93_6var, onvalue=1, offvalue=0)
b93_7 = ttk.Checkbutton(content, variable=b93_7var, onvalue=1, offvalue=0)
b93_8 = ttk.Checkbutton(content, variable=b93_8var, onvalue=1, offvalue=0)
b93_9 = ttk.Checkbutton(content, variable=b93_9var, onvalue=1, offvalue=0)
b93_10 = ttk.Checkbutton(content, variable=b93_10var, onvalue=1, offvalue=0)
b93_11 = ttk.Checkbutton(content, variable=b93_11var, onvalue=1, offvalue=0)
b93_12 = ttk.Checkbutton(content, variable=b93_12var, onvalue=1, offvalue=0)
b93_13 = ttk.Checkbutton(content, variable=b93_13var, onvalue=1, offvalue=0)
b93_14 = ttk.Checkbutton(content, variable=b93_14var, onvalue=1, offvalue=0)
b93_15 = ttk.Checkbutton(content, variable=b93_15var, onvalue=1, offvalue=0)
b93_17 = ttk.Checkbutton(content, text="HALT", variable=b93_17var, onvalue=1, offvalue=0)
trig_94 = ttk.Checkbutton(content, variable=trig_94var, onvalue=1, offvalue=0)

b94_0 = ttk.Checkbutton(content, variable=b94_0var, onvalue=1, offvalue=0)
b94_1 = ttk.Checkbutton(content, variable=b94_1var, onvalue=1, offvalue=0)
b94_2 = ttk.Checkbutton(content, variable=b94_2var, onvalue=1, offvalue=0)
b94_3 = ttk.Checkbutton(content, variable=b94_3var, onvalue=1, offvalue=0)
b94_4 = ttk.Checkbutton(content, variable=b94_4var, onvalue=1, offvalue=0)
b94_5 = ttk.Checkbutton(content, variable=b94_5var, onvalue=1, offvalue=0)
b94_6 = ttk.Checkbutton(content, variable=b94_6var, onvalue=1, offvalue=0)
b94_7 = ttk.Checkbutton(content, variable=b94_7var, onvalue=1, offvalue=0)
b94_8 = ttk.Checkbutton(content, variable=b94_8var, onvalue=1, offvalue=0)
b94_9 = ttk.Checkbutton(content, variable=b94_9var, onvalue=1, offvalue=0)
b94_10 = ttk.Checkbutton(content, variable=b94_10var, onvalue=1, offvalue=0)
b94_11 = ttk.Checkbutton(content, variable=b94_11var, onvalue=1, offvalue=0)
b94_12 = ttk.Checkbutton(content, variable=b94_12var, onvalue=1, offvalue=0)
b94_13 = ttk.Checkbutton(content, variable=b94_13var, onvalue=1, offvalue=0)
b94_14 = ttk.Checkbutton(content, variable=b94_14var, onvalue=1, offvalue=0)
b94_15 = ttk.Checkbutton(content, variable=b94_15var, onvalue=1, offvalue=0)
b94_17 = ttk.Checkbutton(content, text="HALT", variable=b94_17var, onvalue=1, offvalue=0)
trig_95 = ttk.Checkbutton(content, variable=trig_95var, onvalue=1, offvalue=0)

b95_0 = ttk.Checkbutton(content, variable=b95_0var, onvalue=1, offvalue=0)
b95_1 = ttk.Checkbutton(content, variable=b95_1var, onvalue=1, offvalue=0)
b95_2 = ttk.Checkbutton(content, variable=b95_2var, onvalue=1, offvalue=0)
b95_3 = ttk.Checkbutton(content, variable=b95_3var, onvalue=1, offvalue=0)
b95_4 = ttk.Checkbutton(content, variable=b95_4var, onvalue=1, offvalue=0)
b95_5 = ttk.Checkbutton(content, variable=b95_5var, onvalue=1, offvalue=0)
b95_6 = ttk.Checkbutton(content, variable=b95_6var, onvalue=1, offvalue=0)
b95_7 = ttk.Checkbutton(content, variable=b95_7var, onvalue=1, offvalue=0)
b95_8 = ttk.Checkbutton(content, variable=b95_8var, onvalue=1, offvalue=0)
b95_9 = ttk.Checkbutton(content, variable=b95_9var, onvalue=1, offvalue=0)
b95_10 = ttk.Checkbutton(content, variable=b95_10var, onvalue=1, offvalue=0)
b95_11 = ttk.Checkbutton(content, variable=b95_11var, onvalue=1, offvalue=0)
b95_12 = ttk.Checkbutton(content, variable=b95_12var, onvalue=1, offvalue=0)
b95_13 = ttk.Checkbutton(content, variable=b95_13var, onvalue=1, offvalue=0)
b95_14 = ttk.Checkbutton(content, variable=b95_14var, onvalue=1, offvalue=0)
b95_15 = ttk.Checkbutton(content, variable=b95_15var, onvalue=1, offvalue=0)
b95_17 = ttk.Checkbutton(content, text="HALT", variable=b95_17var, onvalue=1, offvalue=0)
trig_96 = ttk.Checkbutton(content, variable=trig_96var, onvalue=1, offvalue=0)

# Placing text beside each beat
nameb92_0.grid(column=1, row=94)
nameb93_0.grid(column=1, row=95)
nameb94_0.grid(column=1, row=96)
nameb95_0.grid(column=1, row=97)

# Placing buttons on grid
b92_0.grid(column=2,row=94)
b92_1.grid(column=3,row=94)
b92_2.grid(column=4,row=94)
b92_3.grid(column=5,row=94)
b92_4.grid(column=6,row=94)
b92_5.grid(column=7,row=94)
b92_6.grid(column=8,row=94)
b92_7.grid(column=9,row=94)
b92_8.grid(column=10,row=94)
b92_9.grid(column=11,row=94)
b92_10.grid(column=12,row=94)
b92_11.grid(column=13,row=94)
b92_12.grid(column=14,row=94)
b92_13.grid(column=15,row=94)
b92_14.grid(column=16,row=94)
b92_15.grid(column=17,row=94)
b92_17.grid(column=19,row=94)
trig_93.grid(column=25,row=94)

b93_0.grid(column=2,row=95)
b93_1.grid(column=3,row=95)
b93_2.grid(column=4,row=95)
b93_3.grid(column=5,row=95)
b93_4.grid(column=6,row=95)
b93_5.grid(column=7,row=95)
b93_6.grid(column=8,row=95)
b93_7.grid(column=9,row=95)
b93_8.grid(column=10,row=95)
b93_9.grid(column=11,row=95)
b93_10.grid(column=12,row=95)
b93_11.grid(column=13,row=95)
b93_12.grid(column=14,row=95)
b93_13.grid(column=15,row=95)
b93_14.grid(column=16,row=95)
b93_15.grid(column=17,row=95)
b93_17.grid(column=19,row=95)
trig_94.grid(column=25,row=95)

b94_0.grid(column=2,row=96)
b94_1.grid(column=3,row=96)
b94_2.grid(column=4,row=96)
b94_3.grid(column=5,row=96)
b94_4.grid(column=6,row=96)
b94_5.grid(column=7,row=96)
b94_6.grid(column=8,row=96)
b94_7.grid(column=9,row=96)
b94_8.grid(column=10,row=96)
b94_9.grid(column=11,row=96)
b94_10.grid(column=12,row=96)
b94_11.grid(column=13,row=96)
b94_12.grid(column=14,row=96)
b94_13.grid(column=15,row=96)
b94_14.grid(column=16,row=96)
b94_15.grid(column=17,row=96)
b94_17.grid(column=19,row=96)
trig_95.grid(column=25,row=96)

b95_0.grid(column=2,row=97)
b95_1.grid(column=3,row=97)
b95_2.grid(column=4,row=97)
b95_3.grid(column=5,row=97)
b95_4.grid(column=6,row=97)
b95_5.grid(column=7,row=97)
b95_6.grid(column=8,row=97)
b95_7.grid(column=9,row=97)
b95_8.grid(column=10,row=97)
b95_9.grid(column=11,row=97)
b95_10.grid(column=12,row=97)
b95_11.grid(column=13,row=97)
b95_12.grid(column=14,row=97)
b95_13.grid(column=15,row=97)
b95_14.grid(column=16,row=97)
b95_15.grid(column=17,row=97)
b95_17.grid(column=19,row=97)
trig_96.grid(column=25,row=97)

# Group 25

# defining labels
nameb96_0 = ttk.Label(content, text="Beat 97", background=c1.get())
nameb97_0 = ttk.Label(content, text="Beat 98", background=c1.get())
nameb98_0 = ttk.Label(content, text="Beat 99", background=c1.get())
nameb99_0 = ttk.Label(content, text="Beat 100", background=c1.get())


# Defining number type
b96_0var = IntVar()
b96_1var = IntVar()
b96_2var = IntVar()
b96_3var = IntVar()
b96_4var = IntVar()
b96_5var = IntVar()
b96_6var = IntVar()
b96_7var = IntVar()
b96_8var = IntVar()
b96_9var = IntVar()
b96_10var = IntVar()
b96_11var = IntVar()
b96_12var = IntVar()
b96_13var = IntVar()
b96_14var = IntVar()
b96_15var = IntVar()
b96_17var = IntVar()
trig_97var = IntVar()

b97_0var = IntVar()
b97_1var = IntVar()
b97_2var = IntVar()
b97_3var = IntVar()
b97_4var = IntVar()
b97_5var = IntVar()
b97_6var = IntVar()
b97_7var = IntVar()
b97_8var = IntVar()
b97_9var = IntVar()
b97_10var = IntVar()
b97_11var = IntVar()
b97_12var = IntVar()
b97_13var = IntVar()
b97_14var = IntVar()
b97_15var = IntVar()
b97_17var = IntVar()
trig_98var = IntVar()

b98_0var = IntVar()
b98_1var = IntVar()
b98_2var = IntVar()
b98_3var = IntVar()
b98_4var = IntVar()
b98_5var = IntVar()
b98_6var = IntVar()
b98_7var = IntVar()
b98_8var = IntVar()
b98_9var = IntVar()
b98_10var = IntVar()
b98_11var = IntVar()
b98_12var = IntVar()
b98_13var = IntVar()
b98_14var = IntVar()
b98_15var = IntVar()
b98_17var = IntVar()
trig_99var = IntVar()

b99_0var = IntVar()
b99_1var = IntVar()
b99_2var = IntVar()
b99_3var = IntVar()
b99_4var = IntVar()
b99_5var = IntVar()
b99_6var = IntVar()
b99_7var = IntVar()
b99_8var = IntVar()
b99_9var = IntVar()
b99_10var = IntVar()
b99_11var = IntVar()
b99_12var = IntVar()
b99_13var = IntVar()
b99_14var = IntVar()
b99_15var = IntVar()
b99_17var = IntVar()
trig_100var = IntVar()

# Setting default button position
b96_0var.set(0)
b96_1var.set(0)
b96_2var.set(0)
b96_3var.set(0)
b96_4var.set(0)
b96_5var.set(0)
b96_6var.set(0)
b96_7var.set(0)
b96_8var.set(0)
b96_9var.set(0)
b96_10var.set(0)
b96_11var.set(0)
b96_12var.set(0)
b96_13var.set(0)
b96_14var.set(0)
b96_15var.set(0)
b96_17var.set(0)
trig_97var.set(0)

b97_0var.set(0)
b97_1var.set(0)
b97_2var.set(0)
b97_3var.set(0)
b97_4var.set(0)
b97_5var.set(0)
b97_6var.set(0)
b97_7var.set(0)
b97_8var.set(0)
b97_9var.set(0)
b97_10var.set(0)
b97_11var.set(0)
b97_12var.set(0)
b97_13var.set(0)
b97_14var.set(0)
b97_15var.set(0)
b97_17var.set(0)
trig_98var.set(0)

b98_0var.set(0)
b98_1var.set(0)
b98_2var.set(0)
b98_3var.set(0)
b98_4var.set(0)
b98_5var.set(0)
b98_6var.set(0)
b98_7var.set(0)
b98_8var.set(0)
b98_9var.set(0)
b98_10var.set(0)
b98_11var.set(0)
b98_12var.set(0)
b98_13var.set(0)
b98_14var.set(0)
b98_15var.set(0)
b98_17var.set(0)
trig_99var.set(0)

b99_0var.set(0)
b99_1var.set(0)
b99_2var.set(0)
b99_3var.set(0)
b99_4var.set(0)
b99_5var.set(0)
b99_6var.set(0)
b99_7var.set(0)
b99_8var.set(0)
b99_9var.set(0)
b99_10var.set(0)
b99_11var.set(0)
b99_12var.set(0)
b99_13var.set(0)
b99_14var.set(0)
b99_15var.set(0)
b99_17var.set(0)
trig_100var.set(0)

# Defining button
b96_0 = ttk.Checkbutton(content, variable=b96_0var, onvalue=1, offvalue=0)
b96_1 = ttk.Checkbutton(content, variable=b96_1var, onvalue=1, offvalue=0)
b96_2 = ttk.Checkbutton(content, variable=b96_2var, onvalue=1, offvalue=0)
b96_3 = ttk.Checkbutton(content, variable=b96_3var, onvalue=1, offvalue=0)
b96_4 = ttk.Checkbutton(content, variable=b96_4var, onvalue=1, offvalue=0)
b96_5 = ttk.Checkbutton(content, variable=b96_5var, onvalue=1, offvalue=0)
b96_6 = ttk.Checkbutton(content, variable=b96_6var, onvalue=1, offvalue=0)
b96_7 = ttk.Checkbutton(content, variable=b96_7var, onvalue=1, offvalue=0)
b96_8 = ttk.Checkbutton(content, variable=b96_8var, onvalue=1, offvalue=0)
b96_9 = ttk.Checkbutton(content, variable=b96_9var, onvalue=1, offvalue=0)
b96_10 = ttk.Checkbutton(content, variable=b96_10var, onvalue=1, offvalue=0)
b96_11 = ttk.Checkbutton(content, variable=b96_11var, onvalue=1, offvalue=0)
b96_12 = ttk.Checkbutton(content, variable=b96_12var, onvalue=1, offvalue=0)
b96_13 = ttk.Checkbutton(content, variable=b96_13var, onvalue=1, offvalue=0)
b96_14 = ttk.Checkbutton(content, variable=b96_14var, onvalue=1, offvalue=0)
b96_15 = ttk.Checkbutton(content, variable=b96_15var, onvalue=1, offvalue=0)
b96_17 = ttk.Checkbutton(content, text="HALT", variable=b96_17var, onvalue=1, offvalue=0)
trig_97 = ttk.Checkbutton(content, variable=trig_97var, onvalue=1, offvalue=0)

b97_0 = ttk.Checkbutton(content, variable=b97_0var, onvalue=1, offvalue=0)
b97_1 = ttk.Checkbutton(content, variable=b97_1var, onvalue=1, offvalue=0)
b97_2 = ttk.Checkbutton(content, variable=b97_2var, onvalue=1, offvalue=0)
b97_3 = ttk.Checkbutton(content, variable=b97_3var, onvalue=1, offvalue=0)
b97_4 = ttk.Checkbutton(content, variable=b97_4var, onvalue=1, offvalue=0)
b97_5 = ttk.Checkbutton(content, variable=b97_5var, onvalue=1, offvalue=0)
b97_6 = ttk.Checkbutton(content, variable=b97_6var, onvalue=1, offvalue=0)
b97_7 = ttk.Checkbutton(content, variable=b97_7var, onvalue=1, offvalue=0)
b97_8 = ttk.Checkbutton(content, variable=b97_8var, onvalue=1, offvalue=0)
b97_9 = ttk.Checkbutton(content, variable=b97_9var, onvalue=1, offvalue=0)
b97_10 = ttk.Checkbutton(content, variable=b97_10var, onvalue=1, offvalue=0)
b97_11 = ttk.Checkbutton(content, variable=b97_11var, onvalue=1, offvalue=0)
b97_12 = ttk.Checkbutton(content, variable=b97_12var, onvalue=1, offvalue=0)
b97_13 = ttk.Checkbutton(content, variable=b97_13var, onvalue=1, offvalue=0)
b97_14 = ttk.Checkbutton(content, variable=b97_14var, onvalue=1, offvalue=0)
b97_15 = ttk.Checkbutton(content, variable=b97_15var, onvalue=1, offvalue=0)
b97_17 = ttk.Checkbutton(content, text="HALT", variable=b97_17var, onvalue=1, offvalue=0)
trig_98 = ttk.Checkbutton(content, variable=trig_98var, onvalue=1, offvalue=0)

b98_0 = ttk.Checkbutton(content, variable=b98_0var, onvalue=1, offvalue=0)
b98_1 = ttk.Checkbutton(content, variable=b98_1var, onvalue=1, offvalue=0)
b98_2 = ttk.Checkbutton(content, variable=b98_2var, onvalue=1, offvalue=0)
b98_3 = ttk.Checkbutton(content, variable=b98_3var, onvalue=1, offvalue=0)
b98_4 = ttk.Checkbutton(content, variable=b98_4var, onvalue=1, offvalue=0)
b98_5 = ttk.Checkbutton(content, variable=b98_5var, onvalue=1, offvalue=0)
b98_6 = ttk.Checkbutton(content, variable=b98_6var, onvalue=1, offvalue=0)
b98_7 = ttk.Checkbutton(content, variable=b98_7var, onvalue=1, offvalue=0)
b98_8 = ttk.Checkbutton(content, variable=b98_8var, onvalue=1, offvalue=0)
b98_9 = ttk.Checkbutton(content, variable=b98_9var, onvalue=1, offvalue=0)
b98_10 = ttk.Checkbutton(content, variable=b98_10var, onvalue=1, offvalue=0)
b98_11 = ttk.Checkbutton(content, variable=b98_11var, onvalue=1, offvalue=0)
b98_12 = ttk.Checkbutton(content, variable=b98_12var, onvalue=1, offvalue=0)
b98_13 = ttk.Checkbutton(content, variable=b98_13var, onvalue=1, offvalue=0)
b98_14 = ttk.Checkbutton(content, variable=b98_14var, onvalue=1, offvalue=0)
b98_15 = ttk.Checkbutton(content, variable=b98_15var, onvalue=1, offvalue=0)
b98_17 = ttk.Checkbutton(content, text="HALT", variable=b98_17var, onvalue=1, offvalue=0)
trig_99 = ttk.Checkbutton(content, variable=trig_99var, onvalue=1, offvalue=0)

b99_0 = ttk.Checkbutton(content, variable=b99_0var, onvalue=1, offvalue=0)
b99_1 = ttk.Checkbutton(content, variable=b99_1var, onvalue=1, offvalue=0)
b99_2 = ttk.Checkbutton(content, variable=b99_2var, onvalue=1, offvalue=0)
b99_3 = ttk.Checkbutton(content, variable=b99_3var, onvalue=1, offvalue=0)
b99_4 = ttk.Checkbutton(content, variable=b99_4var, onvalue=1, offvalue=0)
b99_5 = ttk.Checkbutton(content, variable=b99_5var, onvalue=1, offvalue=0)
b99_6 = ttk.Checkbutton(content, variable=b99_6var, onvalue=1, offvalue=0)
b99_7 = ttk.Checkbutton(content, variable=b99_7var, onvalue=1, offvalue=0)
b99_8 = ttk.Checkbutton(content, variable=b99_8var, onvalue=1, offvalue=0)
b99_9 = ttk.Checkbutton(content, variable=b99_9var, onvalue=1, offvalue=0)
b99_10 = ttk.Checkbutton(content, variable=b99_10var, onvalue=1, offvalue=0)
b99_11 = ttk.Checkbutton(content, variable=b99_11var, onvalue=1, offvalue=0)
b99_12 = ttk.Checkbutton(content, variable=b99_12var, onvalue=1, offvalue=0)
b99_13 = ttk.Checkbutton(content, variable=b99_13var, onvalue=1, offvalue=0)
b99_14 = ttk.Checkbutton(content, variable=b99_14var, onvalue=1, offvalue=0)
b99_15 = ttk.Checkbutton(content, variable=b99_15var, onvalue=1, offvalue=0)
b99_17 = ttk.Checkbutton(content, text="HALT", variable=b99_17var, onvalue=1, offvalue=0)
trig_100 = ttk.Checkbutton(content, variable=trig_100var, onvalue=1, offvalue=0)

# Placing text beside each beat
nameb96_0.grid(column=1, row=98)
nameb97_0.grid(column=1, row=99)
nameb98_0.grid(column=1, row=100)
nameb99_0.grid(column=1, row=101)

# Placing buttons on grid
b96_0.grid(column=2,row=98)
b96_1.grid(column=3,row=98)
b96_2.grid(column=4,row=98)
b96_3.grid(column=5,row=98)
b96_4.grid(column=6,row=98)
b96_5.grid(column=7,row=98)
b96_6.grid(column=8,row=98)
b96_7.grid(column=9,row=98)
b96_8.grid(column=10,row=98)
b96_9.grid(column=11,row=98)
b96_10.grid(column=12,row=98)
b96_11.grid(column=13,row=98)
b96_12.grid(column=14,row=98)
b96_13.grid(column=15,row=98)
b96_14.grid(column=16,row=98)
b96_15.grid(column=17,row=98)
b96_17.grid(column=19,row=98)
trig_97.grid(column=25,row=98)

b97_0.grid(column=2,row=99)
b97_1.grid(column=3,row=99)
b97_2.grid(column=4,row=99)
b97_3.grid(column=5,row=99)
b97_4.grid(column=6,row=99)
b97_5.grid(column=7,row=99)
b97_6.grid(column=8,row=99)
b97_7.grid(column=9,row=99)
b97_8.grid(column=10,row=99)
b97_9.grid(column=11,row=99)
b97_10.grid(column=12,row=99)
b97_11.grid(column=13,row=99)
b97_12.grid(column=14,row=99)
b97_13.grid(column=15,row=99)
b97_14.grid(column=16,row=99)
b97_15.grid(column=17,row=99)
b97_17.grid(column=19,row=99)
trig_98.grid(column=25,row=99)

b98_0.grid(column=2,row=100)
b98_1.grid(column=3,row=100)
b98_2.grid(column=4,row=100)
b98_3.grid(column=5,row=100)
b98_4.grid(column=6,row=100)
b98_5.grid(column=7,row=100)
b98_6.grid(column=8,row=100)
b98_7.grid(column=9,row=100)
b98_8.grid(column=10,row=100)
b98_9.grid(column=11,row=100)
b98_10.grid(column=12,row=100)
b98_11.grid(column=13,row=100)
b98_12.grid(column=14,row=100)
b98_13.grid(column=15,row=100)
b98_14.grid(column=16,row=100)
b98_15.grid(column=17,row=100)
b98_17.grid(column=19,row=100)
trig_99.grid(column=25,row=100)

b99_0.grid(column=2,row=101)
b99_1.grid(column=3,row=101)
b99_2.grid(column=4,row=101)
b99_3.grid(column=5,row=101)
b99_4.grid(column=6,row=101)
b99_5.grid(column=7,row=101)
b99_6.grid(column=8,row=101)
b99_7.grid(column=9,row=101)
b99_8.grid(column=10,row=101)
b99_9.grid(column=11,row=101)
b99_10.grid(column=12,row=101)
b99_11.grid(column=13,row=101)
b99_12.grid(column=14,row=101)
b99_13.grid(column=15,row=101)
b99_14.grid(column=16,row=101)
b99_15.grid(column=17,row=101)
b99_17.grid(column=19,row=101)
trig_100.grid(column=25,row=101)

#Drum/Synth tempo tracking disable
trackdis_var = IntVar()
trackdis_var.set(0)
trackdis = ttk.Checkbutton(content, text="ENABLE SYNTH TRACKING", variable=trackdis_var, onvalue=1, offvalue=0)
trackdis.grid(column=38,row=15)

# Defining Start/Stop etc. button colours
ttk.Style().configure('red.TButton', background='firebrick')
ttk.Style().configure('green.TButton', background='pale green')
ttk.Style().configure('orange.TButton', background='peru')
ttk.Style().configure('cream1.TButton', background='cornsilk3')
ttk.Style().configure('cream2.TButton', background='cornsilk2')
ttk.Style().configure('blue.TButton', background='deep sky blue')
ttk.Style().configure('lightblue.TButton', background='lightblue')

button_1 = ttk.Button(content, command=start, text="START", style='green.TButton').grid(column=38, row=22, columnspan=1)
button_2 = ttk.Button(content, command=reset, text="RESET", style='orange.TButton').grid(column=38, row=21, columnspan=1)
button_3 = ttk.Button(content, command=stop, text="STOP", style='red.TButton').grid(column=38, row=20, columnspan=1)
button_4 = ttk.Button(content, command=repeatup, text="SHORTER",style='cream1.TButton').grid(column=38, row=10, columnspan=1)
button_5 = ttk.Button(content, command=repeatdn, text="LONGER",style='cream2.TButton').grid(column=38, row=12, columnspan=1)
button_6 = ttk.Button(content, command=loopup, text="MORE",style='cream1.TButton').grid(column=38, row=5, columnspan=1)
button_7 = ttk.Button(content, command=loopdn, text="LESS",style='cream2.TButton').grid(column=38, row=7, columnspan=1)
button_8 = ttk.Button(content, command=synthstart, text="START", style='lightblue.TButton').grid(column=38, row=26, columnspan=1)
button_9 = ttk.Button(content, command=synthstop, text="STOP", style='blue.TButton').grid(column=38, row=25, columnspan=1)
button_10 = ttk.Button(content, command=trackup, text="FASTER", style='cream1.TButton').grid(column=38, row=16, columnspan=1)
button_11 = ttk.Button(content, command=trackdn, text="SLOWER", style='cream2.TButton').grid(column=38, row=17, columnspan=1)

#defining temp buttons
ff0 = ttk.Button(content, command=f0, text="F", width=1, style='cream1.TButton').grid(column=23, row=2, columnspan=1)
ff1 = ttk.Button(content, command=f1, text="F", width=1, style='cream1.TButton').grid(column=23, row=3, columnspan=1)
ff2 = ttk.Button(content, command=f2, text="F", width=1, style='cream1.TButton').grid(column=23, row=4, columnspan=1)
ff3 = ttk.Button(content, command=f3, text="F", width=1, style='cream1.TButton').grid(column=23, row=5, columnspan=1)
ff4 = ttk.Button(content, command=f4, text="F", width=1, style='cream1.TButton').grid(column=23, row=6, columnspan=1)
ff5 = ttk.Button(content, command=f5, text="F", width=1, style='cream1.TButton').grid(column=23, row=7, columnspan=1)
ff6 = ttk.Button(content, command=f6, text="F", width=1, style='cream1.TButton').grid(column=23, row=8, columnspan=1)
ff7 = ttk.Button(content, command=f7, text="F", width=1, style='cream1.TButton').grid(column=23, row=9, columnspan=1)
ff8 = ttk.Button(content, command=f8, text="F", width=1, style='cream1.TButton').grid(column=23, row=10, columnspan=1)
ff9 = ttk.Button(content, command=f9, text="F", width=1, style='cream1.TButton').grid(column=23, row=11, columnspan=1)
ff10 = ttk.Button(content, command=f10, text="F", width=1, style='cream1.TButton').grid(column=23, row=12, columnspan=1)
ff11 = ttk.Button(content, command=f11, text="F", width=1, style='cream1.TButton').grid(column=23, row=13, columnspan=1)
ff12 = ttk.Button(content, command=f12, text="F", width=1, style='cream1.TButton').grid(column=23, row=14, columnspan=1)
ff13 = ttk.Button(content, command=f13, text="F", width=1, style='cream1.TButton').grid(column=23, row=15, columnspan=1)
ff14 = ttk.Button(content, command=f14, text="F", width=1, style='cream1.TButton').grid(column=23, row=16, columnspan=1)
ff15 = ttk.Button(content, command=f15, text="F", width=1, style='cream1.TButton').grid(column=23, row=17, columnspan=1)
ff16 = ttk.Button(content, command=f16, text="F", width=1, style='cream1.TButton').grid(column=23, row=18, columnspan=1)
ff17 = ttk.Button(content, command=f17, text="F", width=1, style='cream1.TButton').grid(column=23, row=19, columnspan=1)
ff18 = ttk.Button(content, command=f18, text="F", width=1, style='cream1.TButton').grid(column=23, row=20, columnspan=1)
ff19 = ttk.Button(content, command=f19, text="F", width=1, style='cream1.TButton').grid(column=23, row=21, columnspan=1)
ff20 = ttk.Button(content, command=f20, text="F", width=1, style='cream1.TButton').grid(column=23, row=22, columnspan=1)
ff21 = ttk.Button(content, command=f21, text="F", width=1, style='cream1.TButton').grid(column=23, row=23, columnspan=1)
ff22 = ttk.Button(content, command=f22, text="F", width=1, style='cream1.TButton').grid(column=23, row=24, columnspan=1)
ff23 = ttk.Button(content, command=f23, text="F", width=1, style='cream1.TButton').grid(column=23, row=25, columnspan=1)
ff24 = ttk.Button(content, command=f24, text="F", width=1, style='cream1.TButton').grid(column=23, row=26, columnspan=1)
ff25 = ttk.Button(content, command=f25, text="F", width=1, style='cream1.TButton').grid(column=23, row=27, columnspan=1)
ff26 = ttk.Button(content, command=f26, text="F", width=1, style='cream1.TButton').grid(column=23, row=28, columnspan=1)
ff27 = ttk.Button(content, command=f27, text="F", width=1, style='cream1.TButton').grid(column=23, row=29, columnspan=1)
ff28 = ttk.Button(content, command=f28, text="F", width=1, style='cream1.TButton').grid(column=23, row=30, columnspan=1)
ff29 = ttk.Button(content, command=f29, text="F", width=1, style='cream1.TButton').grid(column=23, row=31, columnspan=1)
ff30 = ttk.Button(content, command=f30, text="F", width=1, style='cream1.TButton').grid(column=23, row=32, columnspan=1)
ff31 = ttk.Button(content, command=f31, text="F", width=1, style='cream1.TButton').grid(column=23, row=33, columnspan=1)
ff32 = ttk.Button(content, command=f32, text="F", width=1, style='cream1.TButton').grid(column=23, row=34, columnspan=1)
ff33 = ttk.Button(content, command=f33, text="F", width=1, style='cream1.TButton').grid(column=23, row=35, columnspan=1)
ff34 = ttk.Button(content, command=f34, text="F", width=1, style='cream1.TButton').grid(column=23, row=36, columnspan=1)
ff35 = ttk.Button(content, command=f35, text="F", width=1, style='cream1.TButton').grid(column=23, row=37, columnspan=1)
ff36 = ttk.Button(content, command=f36, text="F", width=1, style='cream1.TButton').grid(column=23, row=38, columnspan=1)
ff37 = ttk.Button(content, command=f37, text="F", width=1, style='cream1.TButton').grid(column=23, row=39, columnspan=1)
ff38 = ttk.Button(content, command=f38, text="F", width=1, style='cream1.TButton').grid(column=23, row=40, columnspan=1)
ff39 = ttk.Button(content, command=f39, text="F", width=1, style='cream1.TButton').grid(column=23, row=41, columnspan=1)
ff40 = ttk.Button(content, command=f40, text="F", width=1, style='cream1.TButton').grid(column=23, row=42, columnspan=1)
ff41 = ttk.Button(content, command=f41, text="F", width=1, style='cream1.TButton').grid(column=23, row=43, columnspan=1)
ff42 = ttk.Button(content, command=f42, text="F", width=1, style='cream1.TButton').grid(column=23, row=44, columnspan=1)
ff43 = ttk.Button(content, command=f43, text="F", width=1, style='cream1.TButton').grid(column=23, row=45, columnspan=1)
ff44 = ttk.Button(content, command=f44, text="F", width=1, style='cream1.TButton').grid(column=23, row=46, columnspan=1)
ff45 = ttk.Button(content, command=f45, text="F", width=1, style='cream1.TButton').grid(column=23, row=47, columnspan=1)
ff46 = ttk.Button(content, command=f46, text="F", width=1, style='cream1.TButton').grid(column=23, row=48, columnspan=1)
ff47 = ttk.Button(content, command=f47, text="F", width=1, style='cream1.TButton').grid(column=23, row=49, columnspan=1)
ff48 = ttk.Button(content, command=f48, text="F", width=1, style='cream1.TButton').grid(column=23, row=50, columnspan=1)
ff49 = ttk.Button(content, command=f49, text="F", width=1, style='cream1.TButton').grid(column=23, row=51, columnspan=1)
ff50 = ttk.Button(content, command=f50, text="F", width=1, style='cream1.TButton').grid(column=23, row=52, columnspan=1)
ff51 = ttk.Button(content, command=f51, text="F", width=1, style='cream1.TButton').grid(column=23, row=53, columnspan=1)
ff52 = ttk.Button(content, command=f52, text="F", width=1, style='cream1.TButton').grid(column=23, row=54, columnspan=1)
ff53 = ttk.Button(content, command=f53, text="F", width=1, style='cream1.TButton').grid(column=23, row=55, columnspan=1)
ff54 = ttk.Button(content, command=f54, text="F", width=1, style='cream1.TButton').grid(column=23, row=56, columnspan=1)
ff55 = ttk.Button(content, command=f55, text="F", width=1, style='cream1.TButton').grid(column=23, row=57, columnspan=1)
ff56 = ttk.Button(content, command=f56, text="F", width=1, style='cream1.TButton').grid(column=23, row=58, columnspan=1)
ff57 = ttk.Button(content, command=f57, text="F", width=1, style='cream1.TButton').grid(column=23, row=59, columnspan=1)
ff58 = ttk.Button(content, command=f58, text="F", width=1, style='cream1.TButton').grid(column=23, row=60, columnspan=1)
ff59 = ttk.Button(content, command=f59, text="F", width=1, style='cream1.TButton').grid(column=23, row=61, columnspan=1)
ff60 = ttk.Button(content, command=f60, text="F", width=1, style='cream1.TButton').grid(column=23, row=62, columnspan=1)
ff61 = ttk.Button(content, command=f61, text="F", width=1, style='cream1.TButton').grid(column=23, row=63, columnspan=1)
ff62 = ttk.Button(content, command=f62, text="F", width=1, style='cream1.TButton').grid(column=23, row=64, columnspan=1)
ff63 = ttk.Button(content, command=f63, text="F", width=1, style='cream1.TButton').grid(column=23, row=65, columnspan=1)
ff64 = ttk.Button(content, command=f64, text="F", width=1, style='cream1.TButton').grid(column=23, row=66, columnspan=1)
ff65 = ttk.Button(content, command=f65, text="F", width=1, style='cream1.TButton').grid(column=23, row=67, columnspan=1)
ff66 = ttk.Button(content, command=f66, text="F", width=1, style='cream1.TButton').grid(column=23, row=68, columnspan=1)
ff67 = ttk.Button(content, command=f67, text="F", width=1, style='cream1.TButton').grid(column=23, row=69, columnspan=1)
ff68 = ttk.Button(content, command=f68, text="F", width=1, style='cream1.TButton').grid(column=23, row=70, columnspan=1)
ff69 = ttk.Button(content, command=f69, text="F", width=1, style='cream1.TButton').grid(column=23, row=71, columnspan=1)
ff70 = ttk.Button(content, command=f70, text="F", width=1, style='cream1.TButton').grid(column=23, row=72, columnspan=1)
ff71 = ttk.Button(content, command=f71, text="F", width=1, style='cream1.TButton').grid(column=23, row=73, columnspan=1)
ff72 = ttk.Button(content, command=f72, text="F", width=1, style='cream1.TButton').grid(column=23, row=74, columnspan=1)
ff73 = ttk.Button(content, command=f73, text="F", width=1, style='cream1.TButton').grid(column=23, row=75, columnspan=1)
ff74 = ttk.Button(content, command=f74, text="F", width=1, style='cream1.TButton').grid(column=23, row=76, columnspan=1)
ff75 = ttk.Button(content, command=f75, text="F", width=1, style='cream1.TButton').grid(column=23, row=77, columnspan=1)
ff76 = ttk.Button(content, command=f76, text="F", width=1, style='cream1.TButton').grid(column=23, row=78, columnspan=1)
ff77 = ttk.Button(content, command=f77, text="F", width=1, style='cream1.TButton').grid(column=23, row=79, columnspan=1)
ff78 = ttk.Button(content, command=f78, text="F", width=1, style='cream1.TButton').grid(column=23, row=80, columnspan=1)
ff79 = ttk.Button(content, command=f79, text="F", width=1, style='cream1.TButton').grid(column=23, row=81, columnspan=1)
ff80 = ttk.Button(content, command=f80, text="F", width=1, style='cream1.TButton').grid(column=23, row=82, columnspan=1)
ff81 = ttk.Button(content, command=f81, text="F", width=1, style='cream1.TButton').grid(column=23, row=83, columnspan=1)
ff82 = ttk.Button(content, command=f82, text="F", width=1, style='cream1.TButton').grid(column=23, row=84, columnspan=1)
ff83 = ttk.Button(content, command=f83, text="F", width=1, style='cream1.TButton').grid(column=23, row=85, columnspan=1)
ff84 = ttk.Button(content, command=f84, text="F", width=1, style='cream1.TButton').grid(column=23, row=86, columnspan=1)
ff85 = ttk.Button(content, command=f85, text="F", width=1, style='cream1.TButton').grid(column=23, row=87, columnspan=1)
ff86 = ttk.Button(content, command=f86, text="F", width=1, style='cream1.TButton').grid(column=23, row=88, columnspan=1)
ff87 = ttk.Button(content, command=f87, text="F", width=1, style='cream1.TButton').grid(column=23, row=89, columnspan=1)
ff88 = ttk.Button(content, command=f88, text="F", width=1, style='cream1.TButton').grid(column=23, row=90, columnspan=1)
ff89 = ttk.Button(content, command=f89, text="F", width=1, style='cream1.TButton').grid(column=23, row=91, columnspan=1)
ff90 = ttk.Button(content, command=f90, text="F", width=1, style='cream1.TButton').grid(column=23, row=92, columnspan=1)
ff91 = ttk.Button(content, command=f91, text="F", width=1, style='cream1.TButton').grid(column=23, row=93, columnspan=1)
ff92 = ttk.Button(content, command=f92, text="F", width=1, style='cream1.TButton').grid(column=23, row=94, columnspan=1)
ff93 = ttk.Button(content, command=f93, text="F", width=1, style='cream1.TButton').grid(column=23, row=95, columnspan=1)
ff94 = ttk.Button(content, command=f94, text="F", width=1, style='cream1.TButton').grid(column=23, row=96, columnspan=1)
ff95 = ttk.Button(content, command=f95, text="F", width=1, style='cream1.TButton').grid(column=23, row=97, columnspan=1)
ff96 = ttk.Button(content, command=f96, text="F", width=1, style='cream1.TButton').grid(column=23, row=98, columnspan=1)
ff97 = ttk.Button(content, command=f97, text="F", width=1, style='cream1.TButton').grid(column=23, row=99, columnspan=1)
ff98 = ttk.Button(content, command=f98, text="F", width=1, style='cream1.TButton').grid(column=23, row=100, columnspan=1)
ff99 = ttk.Button(content, command=f99, text="F", width=1, style='cream1.TButton').grid(column=23, row=101, columnspan=1)

ss0 = ttk.Button(content, command=s0, text="S", width=1, style='cream2.TButton').grid(column=21, row=2, columnspan=1)
ss1 = ttk.Button(content, command=s1, text="S", width=1, style='cream2.TButton').grid(column=21, row=3, columnspan=1)
ss2 = ttk.Button(content, command=s2, text="S", width=1, style='cream2.TButton').grid(column=21, row=4, columnspan=1)
ss3 = ttk.Button(content, command=s3, text="S", width=1, style='cream2.TButton').grid(column=21, row=5, columnspan=1)
ss4 = ttk.Button(content, command=s4, text="S", width=1, style='cream2.TButton').grid(column=21, row=6, columnspan=1)
ss5 = ttk.Button(content, command=s5, text="S", width=1, style='cream2.TButton').grid(column=21, row=7, columnspan=1)
ss6 = ttk.Button(content, command=s6, text="S", width=1, style='cream2.TButton').grid(column=21, row=8, columnspan=1)
sss7 = ttk.Button(content, command=s7, text="S", width=1, style='cream2.TButton').grid(column=21, row=9, columnspan=1)
ss8 = ttk.Button(content, command=s8, text="S", width=1, style='cream2.TButton').grid(column=21, row=10, columnspan=1)
ss9 = ttk.Button(content, command=s9, text="S", width=1, style='cream2.TButton').grid(column=21, row=11, columnspan=1)
ss10 = ttk.Button(content, command=s10, text="S", width=1, style='cream2.TButton').grid(column=21, row=12, columnspan=1)
ss11 = ttk.Button(content, command=s11, text="S", width=1, style='cream2.TButton').grid(column=21, row=13, columnspan=1)
ss12 = ttk.Button(content, command=s12, text="S", width=1, style='cream2.TButton').grid(column=21, row=14, columnspan=1)
ss13 = ttk.Button(content, command=s13, text="S", width=1, style='cream2.TButton').grid(column=21, row=15, columnspan=1)
ss14 = ttk.Button(content, command=s14, text="S", width=1, style='cream2.TButton').grid(column=21, row=16, columnspan=1)
ss15 = ttk.Button(content, command=s15, text="S", width=1, style='cream2.TButton').grid(column=21, row=17, columnspan=1)
ss16 = ttk.Button(content, command=s16, text="S", width=1, style='cream2.TButton').grid(column=21, row=18, columnspan=1)
ss17 = ttk.Button(content, command=s17, text="S", width=1, style='cream2.TButton').grid(column=21, row=19, columnspan=1)
ss18 = ttk.Button(content, command=s18, text="S", width=1, style='cream2.TButton').grid(column=21, row=20, columnspan=1)
ss19 = ttk.Button(content, command=s19, text="S", width=1, style='cream2.TButton').grid(column=21, row=21, columnspan=1)
ss20 = ttk.Button(content, command=s20, text="S", width=1, style='cream2.TButton').grid(column=21, row=22, columnspan=1)
ss21 = ttk.Button(content, command=s21, text="S", width=1, style='cream2.TButton').grid(column=21, row=23, columnspan=1)
ss22 = ttk.Button(content, command=s22, text="S", width=1, style='cream2.TButton').grid(column=21, row=24, columnspan=1)
ss23 = ttk.Button(content, command=s23, text="S", width=1, style='cream2.TButton').grid(column=21, row=25, columnspan=1)
ss24 = ttk.Button(content, command=s24, text="S", width=1, style='cream2.TButton').grid(column=21, row=26, columnspan=1)
ss25 = ttk.Button(content, command=s25, text="S", width=1, style='cream2.TButton').grid(column=21, row=27, columnspan=1)
ss26 = ttk.Button(content, command=s26, text="S", width=1, style='cream2.TButton').grid(column=21, row=28, columnspan=1)
ss27 = ttk.Button(content, command=s27, text="S", width=1, style='cream2.TButton').grid(column=21, row=29, columnspan=1)
ss28 = ttk.Button(content, command=s28, text="S", width=1, style='cream2.TButton').grid(column=21, row=30, columnspan=1)
ss29 = ttk.Button(content, command=s29, text="S", width=1, style='cream2.TButton').grid(column=21, row=31, columnspan=1)
ss30 = ttk.Button(content, command=s30, text="S", width=1, style='cream2.TButton').grid(column=21, row=32, columnspan=1)
ss31 = ttk.Button(content, command=s31, text="S", width=1, style='cream2.TButton').grid(column=21, row=33, columnspan=1)
ss32 = ttk.Button(content, command=s32, text="S", width=1, style='cream2.TButton').grid(column=21, row=34, columnspan=1)
ss33 = ttk.Button(content, command=s33, text="S", width=1, style='cream2.TButton').grid(column=21, row=35, columnspan=1)
ss34 = ttk.Button(content, command=s34, text="S", width=1, style='cream2.TButton').grid(column=21, row=36, columnspan=1)
ss35 = ttk.Button(content, command=s35, text="S", width=1, style='cream2.TButton').grid(column=21, row=37, columnspan=1)
ss36 = ttk.Button(content, command=s36, text="S", width=1, style='cream2.TButton').grid(column=21, row=38, columnspan=1)
ss37 = ttk.Button(content, command=s37, text="S", width=1, style='cream2.TButton').grid(column=21, row=39, columnspan=1)
ss38 = ttk.Button(content, command=s38, text="S", width=1, style='cream2.TButton').grid(column=21, row=40, columnspan=1)
ss39 = ttk.Button(content, command=s39, text="S", width=1, style='cream2.TButton').grid(column=21, row=41, columnspan=1)
ss40 = ttk.Button(content, command=s40, text="S", width=1, style='cream2.TButton').grid(column=21, row=42, columnspan=1)
ss41 = ttk.Button(content, command=s41, text="S", width=1, style='cream2.TButton').grid(column=21, row=43, columnspan=1)
ss42 = ttk.Button(content, command=s42, text="S", width=1, style='cream2.TButton').grid(column=21, row=44, columnspan=1)
ss43 = ttk.Button(content, command=s43, text="S", width=1, style='cream2.TButton').grid(column=21, row=45, columnspan=1)
ss44 = ttk.Button(content, command=s44, text="S", width=1, style='cream2.TButton').grid(column=21, row=46, columnspan=1)
ss45 = ttk.Button(content, command=s45, text="S", width=1, style='cream2.TButton').grid(column=21, row=47, columnspan=1)
ss46 = ttk.Button(content, command=s46, text="S", width=1, style='cream2.TButton').grid(column=21, row=48, columnspan=1)
ss47 = ttk.Button(content, command=s47, text="S", width=1, style='cream2.TButton').grid(column=21, row=49, columnspan=1)
ss48 = ttk.Button(content, command=s48, text="S", width=1, style='cream2.TButton').grid(column=21, row=50, columnspan=1)
ss49 = ttk.Button(content, command=s49, text="S", width=1, style='cream2.TButton').grid(column=21, row=51, columnspan=1)
ss50 = ttk.Button(content, command=s50, text="S", width=1, style='cream2.TButton').grid(column=21, row=52, columnspan=1)
ss51 = ttk.Button(content, command=s51, text="S", width=1, style='cream2.TButton').grid(column=21, row=53, columnspan=1)
ss52 = ttk.Button(content, command=s52, text="S", width=1, style='cream2.TButton').grid(column=21, row=54, columnspan=1)
ss53 = ttk.Button(content, command=s53, text="S", width=1, style='cream2.TButton').grid(column=21, row=55, columnspan=1)
ss54 = ttk.Button(content, command=s54, text="S", width=1, style='cream2.TButton').grid(column=21, row=56, columnspan=1)
ss55 = ttk.Button(content, command=s55, text="S", width=1, style='cream2.TButton').grid(column=21, row=57, columnspan=1)
ss56 = ttk.Button(content, command=s56, text="S", width=1, style='cream2.TButton').grid(column=21, row=58, columnspan=1)
ss57 = ttk.Button(content, command=s57, text="S", width=1, style='cream2.TButton').grid(column=21, row=59, columnspan=1)
ss58 = ttk.Button(content, command=s58, text="S", width=1, style='cream2.TButton').grid(column=21, row=60, columnspan=1)
ss59 = ttk.Button(content, command=s59, text="S", width=1, style='cream2.TButton').grid(column=21, row=61, columnspan=1)
ss60 = ttk.Button(content, command=s60, text="S", width=1, style='cream2.TButton').grid(column=21, row=62, columnspan=1)
ss61 = ttk.Button(content, command=s61, text="S", width=1, style='cream2.TButton').grid(column=21, row=63, columnspan=1)
ss62 = ttk.Button(content, command=s62, text="S", width=1, style='cream2.TButton').grid(column=21, row=64, columnspan=1)
ss63 = ttk.Button(content, command=s63, text="S", width=1, style='cream2.TButton').grid(column=21, row=65, columnspan=1)
ss64 = ttk.Button(content, command=s64, text="S", width=1, style='cream2.TButton').grid(column=21, row=66, columnspan=1)
ss65 = ttk.Button(content, command=s65, text="S", width=1, style='cream2.TButton').grid(column=21, row=67, columnspan=1)
ss66 = ttk.Button(content, command=s66, text="S", width=1, style='cream2.TButton').grid(column=21, row=68, columnspan=1)
ss67 = ttk.Button(content, command=s67, text="S", width=1, style='cream2.TButton').grid(column=21, row=69, columnspan=1)
ss68 = ttk.Button(content, command=s68, text="S", width=1, style='cream2.TButton').grid(column=21, row=70, columnspan=1)
ss69 = ttk.Button(content, command=s69, text="S", width=1, style='cream2.TButton').grid(column=21, row=71, columnspan=1)
ss70 = ttk.Button(content, command=s70, text="S", width=1, style='cream2.TButton').grid(column=21, row=72, columnspan=1)
ss71 = ttk.Button(content, command=s71, text="S", width=1, style='cream2.TButton').grid(column=21, row=73, columnspan=1)
ss72 = ttk.Button(content, command=s72, text="S", width=1, style='cream2.TButton').grid(column=21, row=74, columnspan=1)
ss73 = ttk.Button(content, command=s73, text="S", width=1, style='cream2.TButton').grid(column=21, row=75, columnspan=1)
ss74 = ttk.Button(content, command=s74, text="S", width=1, style='cream2.TButton').grid(column=21, row=76, columnspan=1)
ss75 = ttk.Button(content, command=s75, text="S", width=1, style='cream2.TButton').grid(column=21, row=77, columnspan=1)
ss76 = ttk.Button(content, command=s76, text="S", width=1, style='cream2.TButton').grid(column=21, row=78, columnspan=1)
ss77 = ttk.Button(content, command=s77, text="S", width=1, style='cream2.TButton').grid(column=21, row=79, columnspan=1)
ss78 = ttk.Button(content, command=s78, text="S", width=1, style='cream2.TButton').grid(column=21, row=80, columnspan=1)
ss79 = ttk.Button(content, command=s79, text="S", width=1, style='cream2.TButton').grid(column=21, row=81, columnspan=1)
ss80 = ttk.Button(content, command=s80, text="S", width=1, style='cream2.TButton').grid(column=21, row=82, columnspan=1)
ss81 = ttk.Button(content, command=s81, text="S", width=1, style='cream2.TButton').grid(column=21, row=83, columnspan=1)
ss82 = ttk.Button(content, command=s82, text="S", width=1, style='cream2.TButton').grid(column=21, row=84, columnspan=1)
ss83 = ttk.Button(content, command=s83, text="S", width=1, style='cream2.TButton').grid(column=21, row=85, columnspan=1)
ss84 = ttk.Button(content, command=s84, text="S", width=1, style='cream2.TButton').grid(column=21, row=86, columnspan=1)
ss85 = ttk.Button(content, command=s85, text="S", width=1, style='cream2.TButton').grid(column=21, row=87, columnspan=1)
ss86 = ttk.Button(content, command=s86, text="S", width=1, style='cream2.TButton').grid(column=21, row=88, columnspan=1)
ss87 = ttk.Button(content, command=s87, text="S", width=1, style='cream2.TButton').grid(column=21, row=89, columnspan=1)
ss88 = ttk.Button(content, command=s88, text="S", width=1, style='cream2.TButton').grid(column=21, row=90, columnspan=1)
ss89 = ttk.Button(content, command=s89, text="S", width=1, style='cream2.TButton').grid(column=21, row=91, columnspan=1)
ss90 = ttk.Button(content, command=s90, text="S", width=1, style='cream2.TButton').grid(column=21, row=92, columnspan=1)
ss91 = ttk.Button(content, command=s91, text="S", width=1, style='cream2.TButton').grid(column=21, row=93, columnspan=1)
ss92 = ttk.Button(content, command=s92, text="S", width=1, style='cream2.TButton').grid(column=21, row=94, columnspan=1)
ss93 = ttk.Button(content, command=s93, text="S", width=1, style='cream2.TButton').grid(column=21, row=95, columnspan=1)
ss94 = ttk.Button(content, command=s94, text="S", width=1, style='cream2.TButton').grid(column=21, row=96, columnspan=1)
ss95 = ttk.Button(content, command=s95, text="S", width=1, style='cream2.TButton').grid(column=21, row=97, columnspan=1)
ss96 = ttk.Button(content, command=s96, text="S", width=1, style='cream2.TButton').grid(column=21, row=98, columnspan=1)
ss97 = ttk.Button(content, command=s97, text="S", width=1, style='cream2.TButton').grid(column=21, row=99, columnspan=1)
ss98 = ttk.Button(content, command=s98, text="S", width=1, style='cream2.TButton').grid(column=21, row=100, columnspan=1)
ss99 = ttk.Button(content, command=s99, text="S", width=1, style='cream2.TButton').grid(column=21, row=101, columnspan=1)

showspeed0 = ttk.Label(content, width=5, text=show_speed0.get())
showspeed0.grid(column=22, row=2, columnspan=1)
showspeed1 = ttk.Label(content, width=5, text=show_speed1.get())
showspeed1.grid(column=22, row=3, columnspan=1)
showspeed2 = ttk.Label(content, width=5, text=show_speed2.get())
showspeed2.grid(column=22, row=4, columnspan=1)
showspeed3 = ttk.Label(content, width=5, text=show_speed3.get())
showspeed3.grid(column=22, row=5, columnspan=1)
showspeed4 = ttk.Label(content, width=5, text=show_speed4.get())
showspeed4.grid(column=22, row=6, columnspan=1)
showspeed5 = ttk.Label(content, width=5, text=show_speed5.get())
showspeed5.grid(column=22, row=7, columnspan=1)
showspeed6 = ttk.Label(content, width=5, text=show_speed6.get())
showspeed6.grid(column=22, row=8, columnspan=1)
showspeed7 = ttk.Label(content, width=5, text=show_speed7.get())
showspeed7.grid(column=22, row=9, columnspan=1)
showspeed8 = ttk.Label(content, width=5, text=show_speed8.get())
showspeed8.grid(column=22, row=10, columnspan=1)
showspeed9 = ttk.Label(content, width=5, text=show_speed9.get())
showspeed9.grid(column=22, row=11, columnspan=1)
showspeed10 = ttk.Label(content, width=5, text=show_speed10.get())
showspeed10.grid(column=22, row=12, columnspan=1)
showspeed11 = ttk.Label(content, width=5, text=show_speed11.get())
showspeed11.grid(column=22, row=13, columnspan=1)
showspeed12 = ttk.Label(content, width=5, text=show_speed12.get())
showspeed12.grid(column=22, row=14, columnspan=1)
showspeed13 = ttk.Label(content, width=5, text=show_speed13.get())
showspeed13.grid(column=22, row=15, columnspan=1)
showspeed14 = ttk.Label(content, width=5, text=show_speed14.get())
showspeed14.grid(column=22, row=16, columnspan=1)
showspeed15 = ttk.Label(content, width=5, text=show_speed15.get())
showspeed15.grid(column=22, row=17, columnspan=1)
showspeed16 = ttk.Label(content, width=5, text=show_speed16.get())
showspeed16.grid(column=22, row=18, columnspan=1)
showspeed17 = ttk.Label(content, width=5, text=show_speed17.get())
showspeed17.grid(column=22, row=19, columnspan=1)
showspeed18 = ttk.Label(content, width=5, text=show_speed18.get())
showspeed18.grid(column=22, row=20, columnspan=1)
showspeed19 = ttk.Label(content, width=5, text=show_speed19.get())
showspeed19.grid(column=22, row=21, columnspan=1)
showspeed20 = ttk.Label(content, width=5, text=show_speed20.get())
showspeed20.grid(column=22, row=22, columnspan=1)
showspeed21 = ttk.Label(content, width=5, text=show_speed21.get())
showspeed21.grid(column=22, row=23, columnspan=1)
showspeed22 = ttk.Label(content, width=5, text=show_speed22.get())
showspeed22.grid(column=22, row=24, columnspan=1)
showspeed23 = ttk.Label(content, width=5, text=show_speed23.get())
showspeed23.grid(column=22, row=25, columnspan=1)
showspeed24 = ttk.Label(content, width=5, text=show_speed24.get())
showspeed24.grid(column=22, row=26, columnspan=1)
showspeed25 = ttk.Label(content, width=5, text=show_speed25.get())
showspeed25.grid(column=22, row=27, columnspan=1)
showspeed26 = ttk.Label(content, width=5, text=show_speed26.get())
showspeed26.grid(column=22, row=28, columnspan=1)
showspeed27 = ttk.Label(content, width=5, text=show_speed27.get())
showspeed27.grid(column=22, row=29, columnspan=1)
showspeed28 = ttk.Label(content, width=5, text=show_speed28.get())
showspeed28.grid(column=22, row=30, columnspan=1)
showspeed29 = ttk.Label(content, width=5, text=show_speed29.get())
showspeed29.grid(column=22, row=31, columnspan=1)
showspeed30 = ttk.Label(content, width=5, text=show_speed30.get())
showspeed30.grid(column=22, row=32, columnspan=1)
showspeed31 = ttk.Label(content, width=5, text=show_speed31.get())
showspeed31.grid(column=22, row=33, columnspan=1)
showspeed32 = ttk.Label(content, width=5, text=show_speed32.get())
showspeed32.grid(column=22, row=34, columnspan=1)
showspeed33 = ttk.Label(content, width=5, text=show_speed33.get())
showspeed33.grid(column=22, row=35, columnspan=1)
showspeed34 = ttk.Label(content, width=5, text=show_speed34.get())
showspeed34.grid(column=22, row=36, columnspan=1)
showspeed35 = ttk.Label(content, width=5, text=show_speed35.get())
showspeed35.grid(column=22, row=37, columnspan=1)
showspeed36 = ttk.Label(content, width=5, text=show_speed36.get())
showspeed36.grid(column=22, row=38, columnspan=1)
showspeed37 = ttk.Label(content, width=5, text=show_speed37.get())
showspeed37.grid(column=22, row=39, columnspan=1)
showspeed38 = ttk.Label(content, width=5, text=show_speed38.get())
showspeed38.grid(column=22, row=40, columnspan=1)
showspeed39 = ttk.Label(content, width=5, text=show_speed39.get())
showspeed39.grid(column=22, row=41, columnspan=1)
showspeed40 = ttk.Label(content, width=5, text=show_speed40.get())
showspeed40.grid(column=22, row=42, columnspan=1)
showspeed41 = ttk.Label(content, width=5, text=show_speed41.get())
showspeed41.grid(column=22, row=43, columnspan=1)
showspeed42 = ttk.Label(content, width=5, text=show_speed42.get())
showspeed42.grid(column=22, row=44, columnspan=1)
showspeed43 = ttk.Label(content, width=5, text=show_speed43.get())
showspeed43.grid(column=22, row=45, columnspan=1)
showspeed44 = ttk.Label(content, width=5, text=show_speed44.get())
showspeed44.grid(column=22, row=46, columnspan=1)
showspeed45 = ttk.Label(content, width=5, text=show_speed45.get())
showspeed45.grid(column=22, row=47, columnspan=1)
showspeed46 = ttk.Label(content, width=5, text=show_speed46.get())
showspeed46.grid(column=22, row=48, columnspan=1)
showspeed47 = ttk.Label(content, width=5, text=show_speed47.get())
showspeed47.grid(column=22, row=49, columnspan=1)
showspeed48 = ttk.Label(content, width=5, text=show_speed48.get())
showspeed48.grid(column=22, row=50, columnspan=1)
showspeed49 = ttk.Label(content, width=5, text=show_speed49.get())
showspeed49.grid(column=22, row=51, columnspan=1)
showspeed50 = ttk.Label(content, width=5, text=show_speed50.get())
showspeed50.grid(column=22, row=52, columnspan=1)
showspeed51 = ttk.Label(content, width=5, text=show_speed51.get())
showspeed51.grid(column=22, row=53, columnspan=1)
showspeed52 = ttk.Label(content, width=5, text=show_speed52.get())
showspeed52.grid(column=22, row=54, columnspan=1)
showspeed53 = ttk.Label(content, width=5, text=show_speed53.get())
showspeed53.grid(column=22, row=55, columnspan=1)
showspeed54 = ttk.Label(content, width=5, text=show_speed54.get())
showspeed54.grid(column=22, row=56, columnspan=1)
showspeed55 = ttk.Label(content, width=5, text=show_speed55.get())
showspeed55.grid(column=22, row=57, columnspan=1)
showspeed56 = ttk.Label(content, width=5, text=show_speed56.get())
showspeed56.grid(column=22, row=58, columnspan=1)
showspeed57 = ttk.Label(content, width=5, text=show_speed57.get())
showspeed57.grid(column=22, row=59, columnspan=1)
showspeed58 = ttk.Label(content, width=5, text=show_speed58.get())
showspeed58.grid(column=22, row=60, columnspan=1)
showspeed59 = ttk.Label(content, width=5, text=show_speed59.get())
showspeed59.grid(column=22, row=61, columnspan=1)
showspeed60 = ttk.Label(content, width=5, text=show_speed60.get())
showspeed60.grid(column=22, row=62, columnspan=1)
showspeed61 = ttk.Label(content, width=5, text=show_speed61.get())
showspeed61.grid(column=22, row=63, columnspan=1)
showspeed62 = ttk.Label(content, width=5, text=show_speed62.get())
showspeed62.grid(column=22, row=64, columnspan=1)
showspeed63 = ttk.Label(content, width=5, text=show_speed63.get())
showspeed63.grid(column=22, row=65, columnspan=1)
showspeed64 = ttk.Label(content, width=5, text=show_speed64.get())
showspeed64.grid(column=22, row=66, columnspan=1)
showspeed65 = ttk.Label(content, width=5, text=show_speed65.get())
showspeed65.grid(column=22, row=67, columnspan=1)
showspeed66 = ttk.Label(content, width=5, text=show_speed66.get())
showspeed66.grid(column=22, row=68, columnspan=1)
showspeed67 = ttk.Label(content, width=5, text=show_speed67.get())
showspeed67.grid(column=22, row=69, columnspan=1)
showspeed68 = ttk.Label(content, width=5, text=show_speed68.get())
showspeed68.grid(column=22, row=70, columnspan=1)
showspeed69 = ttk.Label(content, width=5, text=show_speed69.get())
showspeed69.grid(column=22, row=71, columnspan=1)
showspeed70 = ttk.Label(content, width=5, text=show_speed70.get())
showspeed70.grid(column=22, row=72, columnspan=1)
showspeed71 = ttk.Label(content, width=5, text=show_speed71.get())
showspeed71.grid(column=22, row=73, columnspan=1)
showspeed72 = ttk.Label(content, width=5, text=show_speed72.get())
showspeed72.grid(column=22, row=74, columnspan=1)
showspeed73 = ttk.Label(content, width=5, text=show_speed73.get())
showspeed73.grid(column=22, row=75, columnspan=1)
showspeed74 = ttk.Label(content, width=5, text=show_speed74.get())
showspeed74.grid(column=22, row=76, columnspan=1)
showspeed75 = ttk.Label(content, width=5, text=show_speed75.get())
showspeed75.grid(column=22, row=77, columnspan=1)
showspeed76 = ttk.Label(content, width=5, text=show_speed76.get())
showspeed76.grid(column=22, row=78, columnspan=1)
showspeed77 = ttk.Label(content, width=5, text=show_speed77.get())
showspeed77.grid(column=22, row=79, columnspan=1)
showspeed78 = ttk.Label(content, width=5, text=show_speed78.get())
showspeed78.grid(column=22, row=80, columnspan=1)
showspeed79 = ttk.Label(content, width=5, text=show_speed79.get())
showspeed79.grid(column=22, row=81, columnspan=1)
showspeed80 = ttk.Label(content, width=5, text=show_speed80.get())
showspeed80.grid(column=22, row=82, columnspan=1)
showspeed81 = ttk.Label(content, width=5, text=show_speed81.get())
showspeed81.grid(column=22, row=83, columnspan=1)
showspeed82 = ttk.Label(content, width=5, text=show_speed82.get())
showspeed82.grid(column=22, row=84, columnspan=1)
showspeed83 = ttk.Label(content, width=5, text=show_speed83.get())
showspeed83.grid(column=22, row=85, columnspan=1)
showspeed84 = ttk.Label(content, width=5, text=show_speed84.get())
showspeed84.grid(column=22, row=86, columnspan=1)
showspeed85 = ttk.Label(content, width=5, text=show_speed85.get())
showspeed85.grid(column=22, row=87, columnspan=1)
showspeed86 = ttk.Label(content, width=5, text=show_speed86.get())
showspeed86.grid(column=22, row=88, columnspan=1)
showspeed87 = ttk.Label(content, width=5, text=show_speed87.get())
showspeed87.grid(column=22, row=89, columnspan=1)
showspeed88 = ttk.Label(content, width=5, text=show_speed88.get())
showspeed88.grid(column=22, row=90, columnspan=1)
showspeed89 = ttk.Label(content, width=5, text=show_speed89.get())
showspeed89.grid(column=22, row=91, columnspan=1)
showspeed90 = ttk.Label(content, width=5, text=show_speed90.get())
showspeed90.grid(column=22, row=92, columnspan=1)
showspeed91 = ttk.Label(content, width=5, text=show_speed91.get())
showspeed91.grid(column=22, row=93, columnspan=1)
showspeed92 = ttk.Label(content, width=5, text=show_speed92.get())
showspeed92.grid(column=22, row=94, columnspan=1)
showspeed93 = ttk.Label(content, width=5, text=show_speed93.get())
showspeed93.grid(column=22, row=95, columnspan=1)
showspeed94 = ttk.Label(content, width=5, text=show_speed94.get())
showspeed94.grid(column=22, row=96, columnspan=1)
showspeed95 = ttk.Label(content, width=5, text=show_speed95.get())
showspeed95.grid(column=22, row=97, columnspan=1)
showspeed96 = ttk.Label(content, width=5, text=show_speed96.get())
showspeed96.grid(column=22, row=98, columnspan=1)
showspeed97 = ttk.Label(content, width=5, text=show_speed97.get())
showspeed97.grid(column=22, row=99, columnspan=1)
showspeed98 = ttk.Label(content, width=5, text=show_speed98.get())
showspeed98.grid(column=22, row=100, columnspan=1)
showspeed99 = ttk.Label(content, width=5, text=show_speed99.get())
showspeed99.grid(column=22, row=101, columnspan=1)

showrepeat = ttk.Label(content, text=show_repeat.get())
showrepeat.grid(column=38, row=11, columnspan=1)

showloop = ttk.Label(content, text=show_loop.get())
showloop.grid(column=38, row=6, columnspan=1)

# Defining labels
repeatdelay = ttk.Label(content, text="LOOP DELAY    ", foreground="steel blue")
repeatdelay.grid(column=38, row=9, columnspan=2)
loopcontrol = ttk.Label(content, text="LOOPS    ", foreground="steel blue")
loopcontrol.grid(column=38, row=4, columnspan=2)
looptitle = ttk.Label(content, text="______LOOP CONTROL______     ", foreground="purple3")
looptitle.grid(column=38, row=0, columnspan=2)
track = ttk.Label(content, text="TEMPO TRACKING    ", foreground="steel blue")
track.grid(column=38, row=14, columnspan=2) 
drumst = ttk.Label(content, text="DRUM TRIGGER    ", foreground="steel blue")
drumst.grid(column=38, row=19, columnspan=2) 
synthst = ttk.Label(content, text="SYNTH SEQUENCER    ", foreground="steel blue")
synthst.grid(column=38, row=24, columnspan=2) 

# Author
nameCopy1 = ttk.Label(content, text="walkerworks 2016", foreground="steel blue")
nameCopy1.grid(column=38, row=200, columnspan=4)

# Resize grip
ttk.Sizegrip().grid(column=1, row=1, sticky=(N,S))

canvas.create_window(0, 0, anchor=NW, window=content)
content.update_idletasks()
canvas.config(scrollregion=canvas.bbox("all"))

menubar=Menu(root)
filemenu=Menu(menubar,tearoff=0)
filemenu.add_command(label="Open", command=file_open)
filemenu.add_command(label="Save As...", command=file_save)
filemenu.add_separator()
filemenu.add_command(label="Exit", command=close_window)
menubar.add_cascade(label="File", menu=filemenu)

filemenu=Menu(menubar,tearoff=0)
filemenu.add_command(label="Drum Start", command=start)
filemenu.add_command(label="Drum Stop", command=stop)
filemenu.add_command(label="Drum Reset", command=reset)
filemenu.add_separator()
filemenu.add_command(label="Synth Start", command=synthstart)
filemenu.add_command(label="Synth Stop", command=synthstop)
filemenu.add_separator()
filemenu.add_command(label="More loops", command=loopup)
filemenu.add_command(label="Less loops", command=loopdn)
filemenu.add_separator()
filemenu.add_command(label="Shorter loop delay", command=repeatup)
filemenu.add_command(label="Longer loop delay", command=repeatdn)
filemenu.add_separator()
filemenu.add_command(label="Tempo faster", command=trackup)
filemenu.add_command(label="Tempo slower", command=trackdn)
menubar.add_cascade(label="Control", menu=filemenu)

helpmenu=Menu(menubar,tearoff=0)
helpmenu.add_command(label="Help",command=help_0)
helpmenu.add_separator()
helpmenu.add_command(label="About",command=about)
menubar.add_cascade(label="Help",menu=helpmenu)
root.config(menu=menubar)


init(root)
root.mainloop()